Some membership sites need to limit signups to users with an approved email domain. For example, you might only want members with a company, university, or organization email address to register.
This recipe restricts membership checkout in Paid Memberships Pro to specific email domains that you define.
It could be an automated alternative to using the Approval Process for Membership Add On.
Understanding How It Works
This recipe uses the pmpro_registration_checks filter to validate the email address entered during membership checkout.
Paid Memberships Pro runs a series of registration checks before completing checkout. Through this filter, you can run custom logic to determine whether a registration should continue or stop. Returning false from your hooked function prevents the checkout from processing and displays an error message to the user.
About the Code Recipe
This recipe validates a user’s email domain during checkout and blocks registrations from unapproved domains. You can apply it site-wide or limit it to specific membership levels by editing the $restricted_levels array in the code.
It extracts the domain from the entered email, compares it to your list of allowed domains (including support for wildcards like *.school.edu), and displays a helpful message if the domain is not allowed.

This solution works across all checkout forms and integrates cleanly with PMPro’s core registration process
The Code Recipe
Update the $valid_domains array to include your organization’s approved domains.
To limit it to specific membership levels, edit the $restricted_levels array.
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.
Video: Coding with Sam Walkthrough
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


