Hey @duffldofflo,
Thank you for reaching out! Yep, you can return the affiliate group an affiliate belongs to. You have two functions that you can rely on based on your needs:
- slicewp_get_affiliate_group( $affiliate ) – Returns the affiliate group (collection) object. You will need to pass either the affiliate object or the affiliate ID. Returns null if the affiliate isn’t in a group.
- slicewp_get_affiliate_group_id( $affiliate ) – Return the affiliate group’s ID. You will need to pass either the affiliate object or the affiliate ID. Returns 0 (integer – zero) if the affiliate isn’t in a group.
Thank you and best wishes,
Mihai