- This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Affiliates Management Plugin for WordPress
by
WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Mycred issue Affiliate Manager
Please i want to stop Affiliate Manager users from getting hooks or points
I have this code
add_filter( ‘mycred_exclude_user’, ‘mycred_pro_exclude_by_wprole’, 10, 3 );
function mycred_pro_exclude_by_wprole( $excluded, $user_id, $mycred ) {
// User is already set to be excluded
if ( $excluded === true ) return $excluded;
if ( $user_id == 0 || $user_id === NULL )
$user = wp_get_current_user();
else
$user = get_userdata( $user_id );
// Look for a specific role – replace with your role
if ( in_array( ‘affilate’, $user->roles ) )
return true;
return $excluded;
}
I have tried changing subscribers to Affiliate but didn’t work
I will also like to award point to referee(referral) after his referral registration
@kingmkn, What do you mean by “hooks or points”? There is no point system in our plugin.
Look at my code, I want Mycred to stop working for Affiliate members…
The code above Stop it working for users as subscribers
I got What I want thanks