Registration of new subscription

I am using the Membership plugin with GridMarket theme. I am also using the Login redirect plugin.
I would like to know the followings:

When users of my site go to register for a new subscription after they are done I get a message stating that they have completed registrations. After that my members have to naviatage to the login form and login to access anything. Is there a way to make it where they automatically login after the subscription is completed.

Using the GridMarket theme I have a custom menu in the sidebar. I am telling the membership plugin to not give access to the custom menu for free users. currently the plugin is hiding the custom menu options, but it is not hiding the title of the menu. Is there a way I can fix this?

Example: Free user

Menu Name > Members

Example of login members

Menu Name > Members
Manage your account
Renew or update membership

Is there a way to hide Menu Name> Member then the user is not login. I don't see the options in the membership plugin to hide the title of a custom menu

  • Mason
    • DEV MAN’s Sidekick


    Is there a way to make it where they automatically login after the subscription is completed.

    This isn't in the plugin's default functionality. It'd have to be custom coded.

    Alternatively you could put a message up encouraging them to login to their account (and provide a link) right in the results of the checkout process. In the settings for each gateway there is the ability to add your own custom message.

    As for the custom menu issue, I'd use one of the included membership widgets. Just select what level you want the widget to display to and then enter the content (you can grab the html for the custom menu from the source of a page that is displaying the menu). Alternatively you'd have to edit the theme to only display the sidebar if the user is loged in.

    Hope this helps!


  • Jonathan
    • The Incredible Code Injector


    Is there a way to make it where they automatically login after the subscription is completed

    Yes, it is possible, but as MasonJames says, requires custom coding. He offers some great solutions, but if you want to try custom coding, this might give you some insight and nudge you in the right direction :slight_smile:

    $user_login = 'admin';
    $user = get_userdatabylogin($user_login);
    $user_id = $user->ID;
    wp_set_current_user($user_id, $user_login);
    do_action('wp_login', $user_login);

    And I think wp_login is depracated now. wp_signon is what should be used:

    WARNING: Auto-login is pretty dangerous stuff, the above code automatically logs in the user as admin. No password needed. "This is powerful stuff, but be careful where/how you use it"

    Oh, and just for kicks, the link below is to another topic where a member was trying to create a situation that as the user logins it adds a subscription - I've added the link just out of interest.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.