I have a relationship custom posts Members [0 .. 1] << Coupons [*] and Trainers [0 .. 1] << Coupons [*], I can able to query a list of coupons that belong to a specific trainer
Hello. Thank you for contacting the Toolset support.
Do you mean that based on the $coupon_ids you get that belongs to specific trainer ID , you want to get the the member IDs that is associated to the $coupon_ids? if yes, you will have to loop through the coupon_ids you get and get the parent using the toolset_get_related_post function and store the found parent in array and later use array_unique function to get unique member IDs.