Memberships 2 Pro plug-in flow

Hello, I am having issues with the flow of the registration/login process using the Memberships 2 Pro plug-in.

So, the registration process works fine if the user goes straight to the registration page(/register also first image below) and signs up there. But if the user arrives at the registration page via the login page or the protected content page, the user is directed to this url: /register/?step=register. This url still displays the same registration form, though once the user submits their info and hits the registration button, the user is directed to the primary sign-up screen rather than the success message page(/registration-complete).

I know I could go into the plug-in files and alter the URLs, but would rather not. I couldn't really find a solution through any of the plug-in/page settings.

Any advice would be greatly appreciated. Please let me know if you need any further clarification of the issue.

Thanks in advance!

  • Vinod Dalvi

    Hi Chris,

    Welcome to the WPMU Dev community and thanks for posting on the forum.

    I could confirm the issue on your site but found it's working fine on my test site.

    I don't see any membership level when registrating user account on your site.

    Have you created any membership level and have you set the Memberships page on the following path?

    Admin Area -> Membership 2 -> Settings -> General

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Kind Regards,
    Vinod Dalvi

  • Ash

    Hello @Chris

    I hope you are well today.

    This is correct behavior. There are two steps of membership registration:
    1. Choose a membership
    2. Fill the form

    You have to go through both steps. So, if you fill the form first, after registration you have to choose a membership. I have just checked with creating an user called "aaaa" and it was exactly same procedure. If the user chooses a membership first, then after that he has to fill the registration form.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Ash

    Hello @Chris

    Is there any way to bypass the “choosing of the membership” step?

    If the user doesn't choose a membership, the user won't be added to that membership and thus he won't get access of the protected content. So, the user must choose a membership.

    There might be another way. You need to create default membership and configure that membership as a regular membership. Then you have to use your own custom registration form using any third part plugin. Then all registered members will get access of the protected contents that is protected within default membership.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Chris

    Thanks Ash. But there still remains one issue:
    If the user arrives on the protected content page without being logged-in, the login form appears with the option to register below the form.

    The register link still goes here: /register/?step=register - which is the issue. I would really like that register link to just be /register - without the extra parameter. I understand why it's there, but my whole issue would be resolved if I could change that URL.

    Let me know what you think.

  • Ash

    Hello @Chris

    Please try the following code:

    add_filter( 'register', 'ms_register_cb', 99, 1 );
    function ms_register_cb( $link ){
    	return '<a href="http://drillcool.com/register/">Register</a>';
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.