Some membership sites want to restrict signups to specific members that are “approved” to join. This method of restricting signups will allow you to send prospective members a specific discount code that is required for membership checkout. For more flexibility in restricting registrations, check out our Approval Process for Membership Add On.

Banner for Require members to use a discount code to checkout for a level

Possible Use Cases

There are many reasons you would want to restrict people from joining your membership, specifically if you have a pre-approval requirement that members must meet in order to join. Some other use cases for this model include:

  • VIP Membership. This recipe is often used if you have a VIP level for certain users only or if you have some customers paying offline and want to give them access to create their full account after the payment is received.
  • Adjusting the price per-member. You can use this approach to create a custom pricing for each member based on a person exchange you have with them. After setting the price for that user, create a unique discount code that adjusts the level price to their price and email it to them. The user can then complete checkout for membership and pay their adjusted rate.
  • Hiding your membership pricing on the frontend. Some sites may want to remove the display of their membership options entirely on the frontend of the site. In this use case, we have seen site owners add a contact us form or link on the “Membership Levels” page. Prospective members can reach out via email to request more information about membership. The site owner then will follow up with the “access code” that allows the person into the membership program.

If you need to create a bulk number of unique codes that all share the same pricing, see the Group Discount Codes Add On.

For a more robust approval process, please see our Approval Process for Membership Add On.

The Code Recipe

You must update the main conditional on line 15 to check for the membership level ID you want to restrict. You can also update the recipe and use line 14 instead to check for a certain discount code. The recipe as coded will only require any discount be used for a membership checkout for level ID 1.

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.

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