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.

Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

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

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

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 plugin to add a temporary banner that lets visitors to your site know about the limited availability of this membership level.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo