Membership 2 Pro post registration redirect

I have a multisite which has 3 subsites and Membership plugin is configured on all the subsites. Right now when the member successfully signs up they are redirected to thank you page.

I want the user to go to the homepage of that particular website.

Please assist.

  • Nithin

    Hi Lucy,

    Checking your multisite installation, the Membership 2 Pro plugin, and the content is protected network wide, which means it only has a single register page linked to the main site, and the users during registration are created specifically in the main site. This is how a multisite registration behaves in WordPress when a plugin is activated network wide.

    When a user registered on a WordPress Multisite all the registration takes place always in your main site. This how the WordPress is built by default.

    With the current configuration, the plugins workflow by default doesn't differentiate the registrations based on each subsite. That's for example in the following multisite link in your site, in here:

    mainsite.com/getcopy/wp-admin
    
    Note: Where mainsite.com would be the name of your site, so please replace it with your site URL

    When the user clicks "Register" link in the above URL, it'll redirect the user to the main sites register page, there isn't any way to differentiate whether the user is trying to register via subsite, nor the user gets created in the subsite. Users will only get created in the main site, which is the default workflow of multisite.

    Just to be sure, is this the register page for every site, right?
    mainsite.com/register-3

    Or have you created register page separately for each subsite? If yes, please point out the page link, so I could check with the developer for any workaround.

    If your intention is to configure Membership plugin fore each subsite, it has to be either manually activated, and configured for each subiste individually, or remove the rule added inside wp-config.php when network activated, so you could manually configure for each subsite:
    define( 'MS_PROTECT_NETWORK', true );

    Please do provide more info, if I'm missing anything, and what exact you are looking to achieve, so I could check this with the developer too.

    Regards,
    Nithin

  • Lucy

    Hi Nithin,

    Sorry if this is a bit confusing, it's been hard to get my head around it!

    What I want is this:

    1. One multisite install of memberships, so I can manage everything from the main site and have all the users in the main site.

    2. For users to be able to register on a subsite and then return to that site after their membership is processed, without them needing to know about the main site. It's no good if they return to the main site after their membership is processed - they need to go back to the subsite where they initially clicked to 'register'.

    3. Each subsite will have it's own 'membership' name, with it's own invitation code, so I was hoping I could use Ellis's workaround from this thread - https://premium.wpmudev.org/forums/topic/membership-2-pro-custom-redirect (it's at the bottom) and set the return url as the subsite url.

    So - if subsite was called 'example school', users would sign up on that subsite for 'example school membership', using the 'EXAMPLESCHOOL' invitation code, I'd want the redirect to point them back to 'example school' url after registration.

    Members will only be able to be part of one membership.

    Can you please advise if this will work, and how to insert the code if it will.

    Thanks,

  • Nithin

    Hi Lucy,

    1. One multisite install of memberships, so I can manage everything from the main site and have all the users in the main site.

    This seems to be the current behaviour in your system, and it seems to load fine at the moment.

    2. For users to be able to register on a subsite and then return to that site after their membership is processed, without them needing to know about the main site. It's no good if they return to the main site after their membership is processed - they need to go back to the subsite where they initially clicked to 'register'.

    As mentioned in the initial reply, I'm afraid, this isn't the default workflow at the moment. In a WordPress multisite all the registration is carried out via the main site, and the Membership 2 Pro plugin follows this workflow.

    3. Each subsite will have it's own 'membership' name, with it's own invitation code, so I was hoping I could use Ellis's workaround from this thread - https://premium.wpmudev.org/forums/topic/membership-2-pro-custom-redirect (it's at the bottom) and set the return url as the subsite url.

    Yes, the code should work mentioned in the above ticket, and you could implement the code as a mu-plugins. Please check this doc on how to use it as a mu-plugins:
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    However as mentioned in point 2, when you try to register it will redirect back to the main site, and once the user has finished the register process, the above code will work, and should redirect you to the custom page in your subsite.

    You can use a plugin like Join My Multisite to make sure once the registration is done the user is also created in the subsite too.
    https://github.com/Ipstenu/join-my-multisite
    https://github.com/Ipstenu/join-my-multisite/archive/master.zip

    Would recommend you to test, and see whether the above would help or not. Have a good day ahead :slight_smile:

    Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.