Getting Started

Affiliate Area

Troubleshooting

Miscellaneous

Integrations

Pre-sale Questions

Developers

Functions

Filters

slicewp_get_current_affiliate_id()

Returns the current user’s affiliate ID.

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

$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