• Resolved duffldofflo

    (@duffldofflo)


    Hi is there a function that allows me to get the group an affiliate belongs to in a php snippet?

    Thank you and regards!

Viewing 1 replies (of 1 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    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

Viewing 1 replies (of 1 total)

The topic ‘Function to get affiliate group?’ is closed to new replies.