WooCommerce – Restrict Products by State or Province

In this tutorial, we’ll show you how to restrict WooCommerce products by state or province. You will be able to hide your WooCommerce products for specific states.

That means all other states will be able to view and purchase the selected products, except the states where these products are restricted.

For example, if you sell products in the US, we’ll show you how to restrict products and show a state selector in the header of your website. Of course, you can select any other country to restrict the products in its states.

WooCommerce doesn’t have that option, but we’ll do it using the Country Catalogs for WooCommerce plugin.

It allows you to apply country, state, or province restrictions to your products, categories, variations, etc. You can create different catalogs for different states in your WooCommerce store.

You can also show different product prices and descriptions for different countries, states or provinces.

You can download the plugin here:

Download Country Catalogs for WooCommerce Plugin - or - Read more

Once you install and activate the plugin, you’re ready to restrict your WooCommerce products by state or province.

Set up the global settings of the plugin

In order to restrict or hide products by state or province, we need to start by setting up the global settings of the plugin.

For this, let’s go to WooCommerce > Settings > Country Restrictions.

Once there, you need to select these settings:

  • Geolocation method: Show country/state selector in the header
  • Restrict by: States or provinces from one country
  • Once you select these values, Save changes.
woocommerce restrict products by state or province

Important. The list of states will be from the “base country” defined in the WooCommerce settings. To change the base country, go to WooCommerce > Settings > General > Store Address > Country.

Option 1 – Restrict all products by state or province

If you want to restrict all your WooCommerce products by state or province (ban states or provinces from viewing and purchasing any products on your store), you can do it easily.

Just move to the Products per country tab in the Country Restrictions settings, and select the following values.

  • Select country: Here you need to enter the states where your products will be restricted.
  • Sell in selected countries/states: No
  • Once you select these values, Save changes.
woocommerce restrict products by state or province

After completely restricting your WooCommerce products by state, you or any customer who visits the store from any state where your products are NOT restricted, will see the products without problems on the store.

woocommerce restrict products by state or province

However, the users who come from the states where the products are restricted won’t see any products in the store.

woocommerce restrict products by state or province

Option 2 – Restrict individual products by state

If you don’t want to globally restrict all your WooCommerce products by state, you can pick some products and restrict them by state without any problems. Instead of editing the global settings of the plugin, you need to:

  1. Go to Products in wp-admin.
  2. Open the product you want to restrict by state.

Once you have opened the product you will restrict for specific states, you need to select the following values in the Product data fields:

  • Selected countries: Enter the states where your products will be restricted.
  • Available in selected countries: No
  • Update the product.
woocommerce restrict products by state or province

Once you apply the changes, the customers from the blocked states or provinces will see all other products, but they won’t see the restricted product(s).

Done!

As you see, it’s really simple to add state restrictions to your WooCommerce products. You can easily hide products by state or country and create different catalogs for different states in your WooCommerce store.

You can download the plugin here:

Download Country Catalogs for WooCommerce Plugin - or - Read more

Close Menu