This recipe allows you to set a specific window of time for membership registration. Anyone who tries to checkout for the level after your specified cutoff date will be shown a message that registration has ended. The level will also be removed from display on your “Membership Levels” page after the cutoff date.

About the Recipe

Some sites need to offer a specific enrollment period, perhaps for a specific session of a class or other training event. Using this recipe, existing members of the level will maintain their accounts through the term or lifetime of their membership.

If you decide to reopen registration at a later date, simply update or remove this customization and uncheck “Disable New Signups” on the Memberships > Settings > Membership Levels > Edit admin page.

The Code Recipe

Adding the recipe to your website

Copy and paste this code recipe into a helper PMPro Customizations plugin. Change line 6 to the ID of your membership level and line 7 to the date the membership stops being offered in YYYY/MM/DD format.

Pro tip: You can use this code recipe along with the Sitewide Sales Add On to add a temporary banner that lets visitors to your site know about the limited availability of this membership level.

Jessica Thomas

This code recipe was written by our very own Jessica Thomas.

Comments (2)

The recipe can be adjusted to check multiple levels or you can duplicate the logic and be sure to adjust the constant variables and function names for your duplicated logic. Our members support team can provide guidance as you begin this code recipe customization.

Leave a Reply

For faster support related to issues on your specific site please open a ticket in our members support area.

Your email address will not be published. Required fields are marked *