WooCommerce – Restrict Coupons by Zip Code

In another tutorial, we’ve shown you how to restrict coupons by city, and here we’ll show you how to restrict your WooCommerce coupons by zip code.

Why would you want to restrict your WooCommerce coupons by zip code?

This is really useful to create great segmented WooCommerce coupon campaigns. You will be able to enable some coupons for specific zip codes. This way, you can improve your WooCommerce sales considerably and prevent customers from applying the wrong coupons.

You just need to install and activate the WooCommerce Product Restrictions by Zip Code plugin. It allows you to restrict:

  • Products
  • Variations
  • Categories
  • Attributes
  • Coupons

And you can restrict this content by city, zip code, store location, state, province, zip code, and custom locations.

Once you install and activate the plugin, follow these simple steps to learn how to restrict your WooCommerce coupons by zip code.

1- Set up the “restrict coupons by zip code” method globally

You need to start by setting up the restriction method you will use. In this case, we will restrict coupons, and we will restrict them by zip code.

Therefore, go to WooCommerce > Settings > Location restrictions and select the following values:

  • I want to restrict: Coupons
  • I want to restrict by: Zip code
  • What happens when the user location is unknown: You can show or hide all products
  • Once you’re done, hit Save changes.

2- Restrict your WooCommerce coupons by zip code

Once you have set the coupon restriction by zip code, you need to block specific WooCommerce coupons for specific zip codes.

You just need to go to the Coupons page in wp-admin and open the coupon you want to restrict by zip code.

Once you open the coupon you want to restrict, go to Usage Restrictions and select the following values:

  • Zip codes: Enter the zip codes here.
  • Available in selected locations: No
  • Once you select thee values, save the changes on your coupon.

woocommerce restrict coupons by zip code

3- WooCommerce coupons restricted by zip code

Now that we have applied the zip code restriction to our coupons, let’s test the restriction by logging out and visiting the WooCommerce store as a normal customer.

As you can see, when the users visit the store for the first time, they will see a popup asking them to enter their zip code.

Note. You can customize the popup message and other aspects in the plugin’s global settings.

woocommerce restrict coupons by zip code

If you enter a restricted zip code and try to apply a coupon on checkout, you will see a message that says, “Coupon is not valid.”

woocommerce restrict coupons by zip code

However, if you use an allowed zip code, you’ll see a message telling you that the coupon code was applied successfully, and the price will be modified as the discount is applied.

woocommerce restrict coupons by zip code

It’s time to create great coupon marketing campaigns. You can create coupons for different zip codes and easily apply restrictions to each coupon.

Definitely, WooCommerce Product Restrictions plugin makes it completely easy for you to restrict products, variations, categories, coupons by store location, zip code, city, state, province, etc.