• Resolved tonygao

    (@tonygao)


    The function pmpro_getMembershipLevelsForUser only return one membership level when a user have multiple active memberships

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter tonygao

    (@tonygao)

    I found the problem. For testing purpose, I created two free memberships (Test and Demo). When I select membership Demo, my membership Test automatically cancelled?

    Why this happened?

    Plugin Author Andrew Lima

    (@andrewza)

    Hi @tonygao

    Thank you for using Paid Memberships Pro.

    By default a user may only have one active membership level at a time. If you want user’s to have more than one membership level you may use the Multiple Memberships Per User Add On.

    I hope this helps get you started and clears things up.

    Thread Starter tonygao

    (@tonygao)

    Thanks

    There are 2 of us on WordPress Admin level. In practice, both should have access to all pages and posts. When the other admin writes a blog post which is on a restricted level I as Admin don’t have access to the post. There is a message that I have to register. Can someone please help.

    Plugin Author Andrew Lima

    (@andrewza)

    @oomkool this sounds like you may not have the same membership level as the other admin? For example if you have Level 1 and the other admin has level 2, if they write a blog post that only allows access to level 2 you wouldn’t be able to view it.

    The post can belong to multiple levels, to give users with level 1 or level 2 access.

    Here’s a code snippet to give admin accounts access to all restricted content without requiring a membership level – https://gist.github.com/andrewlimaza/823ddff62b8aedafc4d4d6663ab9f695

    I have since discovered that admins don’t have access to all membership levels. There are a few complex work arounds for that. You could also buy a super admin plugin. None of the solutions appear very attractive to me.

    Andrew thanks for the code snippet I will try it.

    I have tried the snipped and procedure suggested by Andrew Lima. I could not log into my blog. I got the following message.

    “Parse error: syntax error, unexpected ‘<‘, expecting end of file in /home/customer/www/imalipro.com/public_html/wp-content/plugins/pmpro-customizations/pmpro-customizations.php on line 12
    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    After I have removed the code the website worked again.

    Plugin Author Andrew Lima

    (@andrewza)

    @oomkool I have commented on the gist but will also comment here in case other users experience the same issue.

    Please don’t copy the opening <?php tag into a custom plugin as it may cause this error.

    Plugin Author Andrew Lima

    (@andrewza)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘pmpro_getMembershipLevelsForUser’ is closed to new replies.