Description#
Checks if the given affiliate is active or not.
An affiliate is considered active only if their status is “active”. If the affiliate has any other status, they’re not considered active.
Parameters#
slicewp_is_affiliate_active( $affiliate_id );
$affiliate_id(int)(required) The ID of the affiliate you wish to check if it’s active.
Return#
(bool) True if the given affiliate is active, false otherwise.
Example#
The following example shows how you can check if affiliate #10 is active.
if ( slicewp_is_affiliate_active( 10 ) ) {
// Do something.
}