Notifications
Clear all

[Solved] Can we assign badges to certain member based on his membership

3 Posts
2 Users
0 Reactions
557 Views
Posts: 1
Topic starter
(@sahib)
New Member
Joined: 1 year ago

I don't want to assign badges to all users based on his points. Also dont want to show points. I want to assign badge to only users who are having Premium membership. Is there is any hooks available for customization inside wpDiscuz - myCRED Integration for developers.

 

Thanks

Sahib Khan

2 Replies
Astghik
Posts: 5956
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi Sahib Khan,

Also dont want to show points.

You can disable it in the Dashboard > Points > Hooks > admin page, just edit the "wpDiscuz Integration" section. Please watch this small video instraction:  https://www.screencast.com/t/BqkfMmeS

I want to assign badge to only users who are having Premium membership. Is there is any hooks available for customization inside wpDiscuz - myCRED Integration for developers.

I'll ask the developers and let you know soon. 

1 Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 5956

I'll ask the developers and let you know soon. 

You should make the customization using the MyCread plugin mycred_the_badge hook. The example is provided below: 

add_filter("mycred_the_badge", function($image, $badge_id, $badge, $userID){
    if($userID == 4){
        return $image;
    }
    return '';
},15,4);

You should customize the code as it's necessary in your case. 

Share:
Scroll to top