slicewp_get_current_affiliate_id()

Description

Returns the current user’s affiliate ID.

Return

(int) Positive integer if the current user is an affiliate, 0 (zero) otherwise.

Example

$affiliate_id = slicewp_get_current_affiliate_id();

// 21 (if the current logged-in user is also an affiliate that has ID 21)
// 0 (if the current user is logged out)
// 0 (if the current user is logged in, but is not an affiliate)

Was this article helpful?

Do you have any feedback or suggestions to improve this page?

Can't find what you're looking for? We're here to help.

Contact us