Support » Plugin: Simple Membership » Help With Connecting to Another Plug

  • TheUglyBug



    I’m using a plug in to show menu items based on roles and it doesn’t seem to work with this plugin. The developer of that plug in requested the following information. Could you please assist?

    How to get an array of all the membership levels, and how to test if the current user has a specific level.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mbrsolution


    Hi, can you share the plugin you are currently using? I have also submitted a message to the developers.

    Kind regards

    Plugin Author wp.insider


    Here are some functions that maybe helpful:

    The following function call will give you an array of all the membership level IDs configured in the site:


    You can then iterate through the array and retrieve each level to get more details. The following is how you can get the role of a membership level (given you know the level ID)

    $level = SwpmUtils::get_membership_level_row_by_id($level_id)
    $role = $level->role;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help With Connecting to Another Plug’ is closed to new replies.