In this guide, we’ll show you how to restrict WooCommerce categories by country.
When customers visit your WooCommerce store from a blocked country, they won’t be able to view the products on the restricted categories:
There are some reasons why you may need to restrict your product categories to specific countries, continents or subregions, as well as great benefits:
- Prevent selling banned products that may be illegal or require special licenses in certain countries.
- Restrict access to specific categories that involve the collection of sensitive personal data in order to meet regulatory requirements and safeguard customer privacy.
- Restrict access to categories that involve high shipping costs to save you money and prevent customer frustration.
- Block access to categories for which you don’t have stock/inventory available for every country, and prevent customers from ordering products you can’t deliver.
We will block or restrict product categories by country / continent using the Country Catalogs for WooCommerce plugin.
It allows you to restrict products, categories, attributes, variations and coupons based on the customer location. You can restrict by country or continent, zip code, state, province, subregion, or using a custom list of locations.
You can download the plugin here:
Download Country Catalogs for WooCommerce Plugin - or - Read more
Once you have installed and activated the Country Catalogs for WooCommerce plugin, follow these steps to restrict product categories per country or continent:
1- Set up the global settings of the plugin
Go to WooCommerce → Product Restrictions by Location.
Once there, you need to click on Open global settings.
In the General settings tab, you need to select what you will restrict and the restriction method you’ll use:
- I want to restrict: Tick the Category and attribute pages checkbox.
- I want to restrict by: Countries/continents
- Select the countries your customers will be able to select when they visit your store. These are the countries where you sell your products.
- Click on Save changes.
2- Restrict WooCommerce product categories by country or continent
Now that you have set up the global settings of the plugin, you can proceed to restrict your WooCommerce product categories by country.
- Go to WooCommerce > Categories.
- Open the category you want to edit.
Optionally, you can go to the Category pages per location tab, click on Go to the list of categories, and open the category you want to edit.
Once you have opened the category you will restrict by country, you need to select the following values:
- Select locations: Enter the countries where your category will be restricted.
- Available in selected locations: No
- Apply this to: You have three options here:
- Category page only
- Products only
- Category and products
- Once you select these values, hit Update to save the changes.
3- Check the result
After blocking your category by country or continent, you can visit your store to check the results.
When customers visit your store, they will view a popup asking them to select their country.
You can also add a country selector to your site’s navigation menus.
When customers select a country where your product category is not restricted, they will be able to view the products, add them to the cart, etc.
But if customers select a country where the category is restricted, they will view a message telling them your store doesn’t have products available for their country.
This is how you can restrict your WooCommerce categories by country, continent, or subregion, using the Country Catalogs for WooCommerce plugin.
This allows you to create different catalogs for different countries, avoid any problems related with legal regulations, save money by not shipping products with high shipping costs, etc.
You can download the plugin here:
Download Country Catalogs for WooCommerce Plugin - or - Read more