Registration completed page linked to from PayPal doesn't work after upgrading to Membership 3.

Hello. I just upgraded to Membership This worked fine using version, but now does NOT work using version

In my Membership > Options > Membership Pages, I have the Registration Completed Page set to a page called "My Membership Benefits"

I registered for an account on the website and then went to PayPal and completed the purchase for the membership. On the PayPal confirmation screen there are two buttons. One button leads the PayPal Account Overview. The other button returns the user to my website.

Clicking the button to return to my website leads to a page that shows a protected content error. The URL is bizarre. Here it is below. I left out my domain in the URL, but left the name of the page in it. It looks like it tries to send the user to the My Membership Benefits page (which I have set in the Options > Membership Pages as I explained above) but fails.

Before I upgraded from to, this worked fine and it would send me back to the My Member Benefits page fine. But now after upgrading it does not work and sends me to a page with a protected content error. After landing on that protected content page, if I manually enter in the URL to the My Membership Benefits page, the user is able to see the page fine. The problem is with the PayPal sending the user back to my website after clicking on the Return to Website button on PayPal after purchasing the membership.

Please help!

Thank you,

  • PC

    Hello there Nick,

    Thanks for posting on the forums.

    There have been a few bugs fixed in the latest version so we can not deny the possibility of an error. However just to make sure that its a bug and give us a right direction to work in, can you kindly downgrade to the older version of Membership plugin (download here : ) and let me know if that works fine ?

    You can take a backup, remove the current version of the plugin and upload the older version.

    Please advise if that fixes the issue !

    Cheers, PC

  • Nick

    Hello @Mac, I have been using version since the first day it came out weeks ago and have purchased a ton of memberships with PayPal using version and clicking that return to website button has always returned me to the correct page. I will downgrade if you want me to, but I don't understand what that will show if I have already had success with this using from weeks ago up until a few hours ago.

  • Nick

    Hi @Mac and @Rheinard,

    I have more details about this. I don't think it has anything to do with PayPal.

    Now when I log in as a user in the Pending Membership subscription, I get the protected content page if I try to access the My Membership Benefits page whether I click the link from the PayPal confirmation screen OR if I just enter the full URL to the My Membership Benefits page.

    For some reason, the plugin won't let any users in the Pending Membership role access the My Membership Benefits page. I have a bunch of access level shortcodes on that page to show different things to different subscriptions. I have some very specific content to be displayed to the users in the Pending Membership role. But they never get a chance because my website is sending them directly to the protected page redirect when trying to go to the page.

    This works fine in Do you know what happened in to not allow Pending Membership users to get hit with that protected page error when trying to go to the My Membership Benefits page?


  • Rheinard

    Hi @Nick,

    I found the cause. Its not so much a bug as a behaviour issue. The behaviour is that when a user registers with an actual subscription, then the "
    Registration completed page" will be viewable. If they have not registered for a subscription then it will be a protected page.

    This behaviour may not be entirely what you want by the sound of it. We've had this as a request from a number of users who use the "
    Registration completed page" to provide restricted content to members.

    I will flag this as an option to be included in so that this can be an option to protect the "Registration completed page" or not (your case).

    If you're comfortable with code, to fix this issue for you immediately you can go to /membership/classes/Membership/Module/Protection.php and remove the following code from line 180 to line 184 (please don't remove anything else or protection will break).


    // If welcome page then redirect.
    if ( isset( $M_options['registrationcompleted_page'] ) && $post->ID == $M_options['registrationcompleted_page'] && ( !is_user_logged_in() || !Membership_Plugin::current_member()->has_subscription() ) ) {

    Or just replace this file with the one attached.

    Sorry for the confusion.


  • Nick

    Hi @Rheinard,

    Thank you for the fast response! I will test this now. It's weird that this worked fine for the past few weeks using version I only ever encountered this issue after installing In my website, I have access level shortcodes on the "Registration Completed Page" to control what subscriptions can see and what they can't.

    I think the reason why this is confusing is because to purchase a membership on a website using your plugin, two things must happen:
    1) The user must register for an account.
    2) The user must purchase a subscription.

    To me, the "Registration Completed Page" means the user registered for an account (completed step 1) but did NOT yet purchase a subscription. I know that's not how you use this page, but there has to be something for users who register an account but do NOT purchase a subscription. You know what I mean? There is nothing stopping the user from registering for an account and then leaving the site without purchasing a membership. It's two separate actions.

    And I can tell you the reason why the user gets the protected content page right after completing the purchase on PayPal is because it takes a few minutes for PayPal to notify the plugin that the user completed the purchase. So after a user completes the purchase on PayPal and then immediately clicks the button on PayPal to return to the website, the user will get the protected content page because PayPal has not yet notified the plugin the user paid.

    We are talking a matter of minutes, but I have to imagine other users must be experiencing this as well? For this situation, because of the lag between PayPal notifying the plugin the user paid and the user returning to the website, there has to be an option not to make that registration completed page protected. Do you see what I mean?

    If you haven't guessed form all these posts over the last few months, in my full time job I am the QA lead for a software company lol. I hope I am more of a help than a pain to you :slight_smile:

    Okay I'm off to test this!


  • Nick

    Hi @Rheinard,

    Your solution of commenting out those 4 lines of code worked. Great job identifying it so quickly! I am going to stay with version since I know there were other bugs fixed with it.

    My other issue about cancelled users getting their premium access back after stopping payment with PayPal is still an issue, and was for the past few versions (

    I know you are busy so I will await your feedback on that issue.

    Thank you as always! Again, fantastic job figuring out a temporary fix to the issue on this thread.


  • Nick

    Hi @Rheinard,

    If I could ask you two quick questions I have been having a hard time understanding. These are 2 quick clarification questions that I want to make sure I understand so I can officially rule them out as causes to the Issues I am experiencing my site.

    #1) Subscription Mode and Period
    I have the Pending Membership subscription's mode set to "Indefinite" and the "Period" set to "1 Day" If the mode is set to "Indefinite", then it doesn't matter what I choose for the Period, right?

    I assumed having the Mode set to "Indefinite" meant the user would be stuck in that subscription forever UNTIL the user decides to purchase a membership through PayPal. Is that true?

    #2) Settings for Membership Renewal and Membership Upgrades
    Under Membership > Configuration, I have both the "Membership Renewal" and "Membership Upgrades" set to the max of 365 days. Knowing how my site works, does this setting affect anything on website? Should the number of days they are set to be something different?

    As you know, I do NOT allow upgrades on my site. Once a user registers for an account they are placed in the Pending Membership subscription. And then once they purchase a membership, they get moved to the Player's P**** Membership. That's it. They cannot upgrade or downgrade. Can you confirm these two settings are ONLY for websites that allow upgrading and downgrading, thus it does not matter what number of days I use for those two fields?

    You wouldn't consider a user moving from the Pending Membership (which is the default subscription for registered users) to the paid subscription of the Player's P**** Membership an "upgrade" (thus abiding by the values of those two fields) right? An "upgrade" or a "downgrade" with the Membership Plugin is if there are different access levels within a subscription, right?

    Thank you,

  • PC

    Hello Nick,

    Thanks for posting back.

    I am sorry to ask you to do extra work, however I will request you to kindly post those new questions on a new thread so that we can avoid any confusions.

    Generally when we keep asking and answering different questions in a single thread, after a few iterations, the thread becomes so complex that its hard to identify what is going on and it impacts the quality of support we can provide.

    I hope you understand that. Please feel free to ask if you have more questions on the original topic and we are standing by to answer your other questions on a new thread :slight_smile:

    PS: Both of those questions are explained in the manual here :

    Page 61 Of 72
    Page 29 Of 72

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.