How to set up WooCommerce zip code based pricing based on postcode, country or area
A customer recently told me that there are no WooCommerce zip code based pricing plugins. I didn’t believe this, so I had a look – and I couldn’t find one either!
I’m writing this tutorial to show you how to set up WooCommerce zipcode based pricing using the WooCommerce Password Protected Categories plugin. You can use it to charge different prices depending on the customer’s zip code, postcode, area, region or country. And it only takes a few minutes to set up!
WooCommerce Protected Categories
The easy way to charge zipcode-specific prices for your WooCommerce products.GET THE PLUGIN
Why use a WooCommerce zip code based pricing plugin?
In an ideal world, everyone would pay the same amount regardless of where they live. However, there are situations where you might want to change your product pricing based on the customer’s zip code or location.
Here are some reasons why you might need location-based pricing:
- If you offer free shipping, then your profitability will vary depending on the customer’s location. There’s no way to avoid this because shipping companies often charge different rates depending on the customer’s zip code, area or country. The easy solution is to set up WooCommerce shipping zones to charge zip code-based shipping, and keep your product prices consistent for all customers. However, if free shipping is a big selling point for your WooCommerce site, then you could keep this while charging higher product prices for customers in more remote locations.
- If your website sells worldwide, then depending on your payment methods, taking payments from customers from other currencies might incur higher fees for you.
- There may be higher legal or administrative fees relating to selling in certain places. You might try to recoup some of this by charging higher prices to those customers. For example, different locations may have different tax rules or legal requirements which make it harder to sell to that area.
- If you provide local services then your prices may differ based on each customer’s zip code area.
- Perhaps you want to reward locals with lower pricing depending on their zip code.
If this sounds like you, then you may be able to increase profitability with WooCommerce zipcode based pricing or country-specific pricing. Read on to discover how to set this up.
What is WooCommerce Protected Categories?
WooCommerce Protected Categories is a WordPress plugin developed by us at Barn2 Media. It restricts access to certain products in your Woo store so that only people with the password can see and buy them.
I’ll talk you through how to use the plugin to achieve zip code based pricing in WooCommerce. You can also use it to change product prices depending on postcode, region, location, country – whatever you like.
In a nutshell, the plugin lets you create a separate product category for each of your price bands. Each category is password protected using one or more zip codes or area names. The customer visits a central login page and enters their area or zip code as the password. This unlocks the category for their area, and instantly directs them to the products with the correct pricing.
Each password protected category will contain a different version of your products, with the correct pricing for that zip code area, region or country.
Each customer will only be able to see the pricing for their own zip code area (i.e. category).
How to set up WooCommerce zipcode based pricing
- First, get the plugin and install it on your website. Activate your license key (you’ll receive this in the confirmation email).
- On the plugin settings page, choose the text that will appear above and on the category login form. For example, you will want to replace ‘Enter your password’ with ‘Enter your zip code’ or similar.
- Create a separate WooCommerce product category for each area that requires its own pricing. For example, you might sell products to 15 local zip codes based on 3 price bands. You would put the 5 zip codes for Band 1 in one category, the 5 zip codes for Band 2 in a second category, and so on.
- Password protect each category using the option in the ‘Visibility’ settings on the add/edit category page. Create a password using each area or zip code that you want to restrict the category to. For example, if you want customers in zip codes 123456 and 987654 to be able to access the category, then create 2 passwords: 123456 and 987654.
- Next, create a separate version of each product – one for each of the categories you just created. (Tip: the Duplicate Post plugin provides one-click cloning of WooCommerce products. Note: You can’t put the same product in more than 1 password protected category.)
- Put each product in the correct category.
- Change the pricing of each product as required.
- Create a category login page by adding the following shortcode wherever you want people to login to the category for their zipcode or area:
When customers enter the password (i.e. their zipcode or area) into the category login form, they will automatically be directed to a hidden category containing the products with their local pricing.
But I want the public to be able to see my products!
The products with area-specific pricing will be hidden from the public parts of your website, so that only customers with the password can view them. However, you don’t have to protect all your products in this way.
Perhaps you want to list each product on your public site, but also want a hidden version of each product for people from different zip code areas. You can achieve this by creating one or more public categories, which will not be password protected. These will appear in the public parts of your WC store in the usual way.
The pricing of your public products will NOT change depending on the customer’s location. The same price will appear for everyone. This means that you need to either show a standard cost which will always be visible in the public part of your site.
If this isn’t appropriate for your site, then you can list the public products without prices. WooCommerce will automatically disable the add to cart buttons for these products. People can view them but not buy online. Customers will have to request the password to view pricing and buy.
How can customers request the password for their zip code?
There are various options for how you can give each customer the password for their zip code. This will depend on how private you want your area-based pricing to be, and whether you have regular or one-off customers:
- If your pricing is not confidential then you could list all the passwords publicly, above the category login form. Customers simply need to find the password relating to their zipcode area, and enter it to see their pricing.
- You could use a WP contact form plugin such as Contact Form 7 to let customers request the password. This is a more secure option, as you can ensure that each customer can only access the prices for their own local zipcode.
- If you have a members-only WooCommerce shop or WooCommerce wholesale store, then you might only sell to pre-approved customers. If this is the case, then you can give them the password directly.
What do you think?
Given that there aren’t any dedicated WooCommerce Zip Code Based Pricing plugins, I’d love to hear how you get on with WooCommerce Protected Categories. I was really interested to hear that a customer was using it for this purpose, and thought that others might like to do the same.
Please leave your comments below!
WooCommerce Protected Categories
Start charging different prices for each zip code today!GET THE PLUGIN