Let Members only register for Membership once

Is there any way to let someone who was already a member of a certain membership not register for the same membership again once it has expired?

  • Sajid

    Hello Agentur Dreirad,
    Hope you are doing good today :slight_smile:

    I am afraid, it is not possible at the momet out of the box. Making this happen would require a good deal of code customization. But let me try to ping one of our SLS (developers) for their invalable feedback on this matter.

    If it can be done quickly and easily then we would love to get back to you as soon as possible with a workaround. But in case, it requires more time than the allowed then our developer will let you know and you have to hire a professional from jobs board to further extend the functionality of plugin according to your requirements.

    Also, please note that, our developers work on more complex task in their day to day job so their response might be slower than normal support staff here. So we appreciate your patience here.

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

    • E-3 Magazin

      Hi Sajid,
      Thanks for your answer! Maybe that should be incorporated into one of the next bigger updates... It should not be too hard to make a subscription non-renewable. Or am i the only one who needs this?
      Anyway for now i discovered, that the renewal button gets the class "membership_renew" and i chose to just not display this button...
      If there is a different and nicer option, i'd love to hear it!

      Thanks again!
      Best regards,

  • Sajid

    Hello Agentur Dreirad,
    Hope you are doing good today :slight_smile:

    I am glad to know you have figured it out. But in case, you don't need a renewable membership. Then you can just create one membership and select Finite Access option in Membership Access Options and Payments Options page. From right form, just select the duration of that subscription. After that period, member will have no subscription for that membership and also no way to renew the membership.

    Take care and have a nice day :slight_smile:

    Best Regards,
    Sajid - WPMU DEV Support

  • Lindeni Mahlalela

    Hello Agentur Dreirad,

    I hope you are doing great today and sorry for the delayed response from our side. I hope your workaround has been working great so far.

    I went through the code of the Membership 2 Plugin and I was able to create an mu-plugin that you can use to entirely remove the expired and cancelled memberships from the signup page so that members will only see the memberships they were never subscribed to.

    I have used the filter
    which gives access to the membership data so we can modify it before the subscriptions and memberships are displayed on the form. It is used as follows:

    add_filter('ms_view_shortcode_membershipsignup_data', 'cal_back_function', 10, 1 );
    function call_back_function($data){
               //modify $data, remove expired and cancelled memberships
               return $data;

    Instead of modifying the data, I have recreated it to make sure the code does not run into any PHP Errors and Warnings regarding modifying the data. Please download the attached 'ms-remove-canceled-and-expired-memberships.zip' file, unzip it, and then upload the file 'ms-remove-canceled-and-expired-memberships.php', then upload the file to the 'wp-content/mu-plugins/ folder so that you will have the file like so:

    If the mu-plugins folder does not exist, you can just create it.

    Before uploading the mu-plugin, you registration page should be showing current subscriptions including expired and cancelled ones like this:

    But after uploading the mu-plugin, it should only list available memberships and current subscriptions. If member does not have an active subscription but only expired or cancelled subscription, then they should only see the Available memberships, this means they will only see the memberships they were never subscribed to. The page should look like this:

    I hope this is what you are looking for and I hope it helps you achieve your goals. If you feel we have missed something or you have any questions, then let us know and we will be always happy to hep in any way possible.

    I hope you enjoy your day further.