• Resolved spacewarp

    (@spacewarp)


    Hello,

    I would like to know if it is possible to have a user automatically put into a membership level once they reach a condition such as having a certain number of points? If not do you know of any plugins that could help?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Are you using a specific plugin to handle user points? If so, if that plugin triggers an action/event when new points are given, you can hook into that and use the API in Restrict User Access to give a new level.

    Something like this:

    
    $level_id = 0;
    add_action('added_points_to_user',function($user) {
        if($user->points > 500) {
            rua_add_user_level($user->ID,$level_id);
        }
    });
    

    I hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘How to automate level membership?’ is closed to new replies.