Our Mailing Address (formerly Shipping Address) Add On allows you to capture the member’s mailing information at checkout. Take full control of the areas you mail to when using the Mailing Address Add On by allowing members to only have the ability to checkout of your membership site by using a valid zip code. Do (more...)
Our Mailing Address (formerly Shipping Address) Add On allows you to capture the member’s mailing information at checkout. Take full control of the areas you mail to when using the Mailing Address Add On by allowing members to only have the ability to checkout of your membership site by using a valid zip code.

Use this recipe if your membership includes a physical component, such as a mailed newsletter, a welcome kit, or any product you ship to members, and you only mail to a limited set of zip codes. It blocks checkout for anyone whose mailing zip code is not on your approved list, so you never collect payment for an order you cannot fulfill.
This recipe is not the right fit if you need to validate zip codes against a large or changing list, verify real address data, or restrict by state, country, or delivery radius instead of exact zip code matches. Those cases call for a dedicated address validation service or a lookup against external data, not a hardcoded array.
Best Practices and Considerations02101), and PHP drops leading zeros from integers.It can be disheartening to receive a payment from a member who just purchased a membership from your site, only to realize their mailing address falls outside your mailing zones. Despite the notices and banners that you carefully placed around the site, warning potential members of the limited mailing areas, a purchase was made. It happens.
The code recipe below lets you set an array of valid zip codes your site will accept to process the order. If the user enters a zip code that is not valid, in other words you do not mail to that specific location, a warning banner will appear apologizing that you do not mail to that area and an alternative location should be selected. If the member enters a valid zip code, no warning is shown and the order is processed normally. You will need to edit the array of zip codes to match the zip codes of areas that you mail to.
Understanding the pmpro_registration_checks HookThis recipe hooks into pmpro_registration_checks, a filter that runs while Paid Memberships Pro validates a checkout submission, before the member’s registration is finalized. Every function hooked to it receives the current pass or fail status as $pmpro_continue_registration and must return a boolean: true to let checkout continue, or false to block it.
Because other checks may run on the same filter, this recipe first checks whether $pmpro_continue_registration is already false. If so, it returns immediately without overwriting an error message from an earlier check. Otherwise, it compares the submitted zip code against your approved list, calls pmpro_setMessage() to display an error when the zip code is not valid, and returns the updated status.
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.
How to Customize This Code Recipe$valid_zip_codes array with the zip codes of the areas you mail to. Keep each one quoted as a string so codes with a leading zero are not stripped.pmpro_setMessage() to match your own wording, for example naming the regions you do mail to.pmpro_hasMembershipLevel() so members at other levels are not affected.![]()
Author: Andrew Lima
Andrew Lima is the Director of Operations at Paid Memberships Pro, with a strong background in WordPress development. Certified in various programming languages, Andrew has been building WordPress websites since 2014.
He finds it rewarding to help PMPro customers build successful businesses and enjoys seeing their growth over time. Andrew values PMPro’s commitment to strong core values and ethics, which makes working with the team a genuine pleasure.
Outside of work, Andrew enjoys discovering new hobbies, experimenting in the kitchen, and immersing himself in video games.
Have a question about how to use this feature? Our Support Page outlines three ways to get support.
Our Max plans include hands-on help customizing your membership site and implementing new features. Upgrade to PMPro Max now »
Was this article helpful?
YesNo
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Exclude Billing Fields for Specific Membership Levels at Checkout | 0 | 5 | 26-06-2026 |
| 2 | Prevent Users From Using an Email Address as Their Username | 0 | 6.97 | 02-10-2026 |
| 3 | Adjust the Set Expiration Year After a Specific Month | 0 | 7.27 | 02-10-2026 |
| 4 | Hide the Discount Code Fields | 0 | 7.65 | 02-10-2026 |
| 5 | Allow Member to Opt-Out of New Series Notification Emails | 0 | 7 | 03-07-2026 |
| 6 | Disable PMPro’s Redirect on the WordPress Registration Page | 0 | 11.99 | 07-10-2026 |
| 7 | Require User Fields on the Member Profile Edit Page | 0 | 5 | 30-06-2026 |
| 8 | Remove the Restricted Access Messages on Blog Homepage | 0 | 7.83 | 01-10-2026 |
| 9 | Give Your Custom Post Types Their Own Memberlite Layout Settings | 0 | 8.1 | 15-10-2026 |
| 10 | Add Custom Colors to the Block Editor Color Palette | 0 | 7.18 | 15-10-2026 |