Our Shipping Address Add On allows you to capture the member’s shipping information at checkout. Take full control of the areas you ship to when using the Shipping Address Add On by allowing members to only have the ability to checkout of your membership site by using a valid zip code.

Banner image for Restrict your Membership Sites Shipping Locations by Specifying Valid Zip Codes

About the Code Recipe.

It can be quite disheartening to receive a payment from a member who just purchased a membership from your site, only to realize that their shipping address falls outside of your shipping zones. Despite the notices and banners that you carefully placed around the site, warning potential members of the limited shipping areas – a purchase was made – it happens.

The Code Recipe below will allow you to set an array of valid zip codes that your site will accept in order to process the order. If the user enters a zip code that is not valid – in other words, you do not ship to that specific location –  a warning banner will appear apologizing that you do not ship 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 ship to.


The Code Recipe

Note: In order for this Code Recipe to work you will need to have Paid Memberships Pro – Shipping Address installed and activated on your site.

Adding the recipe to your website

Copy and paste this code recipe into a helper PMPro Customizations plugin.

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