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.
Table of contents
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.
More Ways to Restrict User Registrations
Check out these additional tutorials with more ways to restrict user registration:
- Restrict Certain Words in Usernames
- Exclude Certain Email Domains from Membership Signup
- Limit the Number of Members by Membership Level
- Offer a Membership Level for a Limited Time
- Restrict Checkout for Users with a History of Refunds
- Restrict Membership Signup by Country
- Restrict Membership Signup by Email Domain
- Require a Discount Code to Checkout for a Certain Level
- Restrict Membership Checkout by Email or Username
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.