Back to Blog
WooCommerce Store Management May 14, 2026

How to set up country-based shipping restrictions in WooCommerce

Yash Patel

Yash Patel

Administrator

How to set up country-based shipping restrictions in WooCommerce

An order lands from a country you do not ship to. You spot it two days later, refund it, eat the payment processing fee, and hope the customer does not leave a review about it. Meanwhile the same product is still sitting there, visible and purchasable, to every other shopper in that region.

Shipping zones alone will not stop this. They control what delivery costs, not whether the sale can happen.

CBR PRO, our WooCommerce country based restrictions plugin, uses WooCommerce geolocation to decide what each visitor can see and buy based on their country, then blocks the order before it reaches your dashboard. Shipping zones control your rates. CBR PRO controls whether the sale happens at all.

This guide walks through the full setup: native shipping zones first, then product, category, shipping class, and payment restrictions on top.

How to set up country-based shipping restrictions step by step

1. Configure your selling and shipping locations first
Go to WooCommerce → Settings → General and set your selling locations and shipping locations. This stops rates from appearing for regions you do not serve, but it does not hide products or stop someone from adding a restricted item to their cart. That gap is what the rest of this guide closes.

2. Turn on geolocation, then install CBR PRO
In WooCommerce → Settings → General, set Default customer location to a geolocation option so WooCommerce’s MaxMind database is active. CBR PRO reads the shipping country from a logged-in customer’s account address, and falls back to IP geolocation for guests. There is a Force geolocation setting if you want IP detection to win every time.

3. Decide how restricted products should behave
Open WooCommerce → Country Restrictions → Settings and pick your catalog visibility rule. You can hide restricted products completely, hide them from the shop and search while keeping direct links alive, or leave them visible but non-purchasable. Hiding completely suits compliance cases. Non-purchasable suits stores that want the SEO value of the product page.

4. Restrict individual products and variations
Edit any product and open its Country Based Restrictions tab. Choose whether the country list you select is the only list allowed, or the list to exclude, and save. Variations can carry their own rules, so a single size or format can be region-locked without touching the parent product.

5. Apply bulk rules by shipping class, category, or tag
The Bulk Restrictions tab is where this scales. Add a new restriction rule, name it for your own reference, then set Restriction By to Global, Category, Tags, Attribute, Shipping class, or a custom taxonomy. Shipping class is the one most stores miss: if your courier will not carry lithium batteries or liquids to certain countries, restrict the class once instead of tagging 300 products.

6. Hide payment gateways for specific countries
Open the Checkout Restrictions tab and add a rule targeting either billing country or shipping country. Select the payment methods and choose Include or Exclude. This is how you keep a local-only gateway off the checkout for international buyers, or block a gateway that your processor does not support in a given market.

7. Write restriction messages customers can act on
CBR PRO gives you separate messages for the product page, the cart, the category page, and product listings, plus control over where the product message appears (before title, after price, after add to cart, and more). Say what is unavailable and why, not just “not available in your country.” A line about where they can buy it instead keeps the visit useful.

8. Test with the debug toolbar before you go live
Enable the debug toolbar in Settings. It shows the detected country in a front-end bar that only administrators can see, so you can confirm rules fire correctly without touching a live customer session. The optional country detection widget does the same job for shoppers, letting them switch their detected country while browsing.

Shipping zones vs country restrictions

Job to be doneWhere it belongs
Show or hide shipping rates by regionWooCommerce shipping zones
Hide restricted products from the catalogCBR PRO catalog visibility
Block add to cart for a blocked countryCBR PRO product rules
Restrict an entire shipping classCBR PRO bulk rules
Hide payment gateways by countryCBR PRO checkout restrictions
Stop the order at Place OrderCBR PRO checkout validation
Test rules as another countryCBR PRO debug toolbar

Common reasons stores restrict by country

ScenarioWhat the restriction does
Licensed digital goodsBlocks sale outside permitted regions
Alcohol or regulated itemsRestricts whole categories by local law
High-shipping-cost zonesHides products from unprofitable regions
Region-exclusive launchesLimits visibility to target markets
Customs-sensitive productsPrevents orders that get held at the border
Approved-country subscriptionsAllows checkout only for permitted buyers

Frequently asked questions about WooCommerce country restrictions

Can WooCommerce restrict products by country without a plugin?
Only partially. WooCommerce core can limit selling and shipping locations under Settings → General, which stops shipping rates for regions you do not serve. It cannot hide individual products, block add-to-cart, restrict payment gateways, or stop a restricted order at checkout. A country restrictions plugin adds those catalog and checkout controls on top of the native zones.

What is the difference between shipping zones and country restrictions?
Shipping zones decide what delivery costs and which rates appear for a region. Country restrictions decide whether a customer in that region can see, add to cart, and pay for a product at all. Zones are about price; restrictions are about permission. Most compliance cases need both.

How does WooCommerce detect a customer’s country?
It uses geolocation via the MaxMind database plus the customer’s account or billing address. For logged-in customers the shipping country from their account is used; for guests it falls back to IP geolocation. A Force geolocation option makes IP detection take priority when you need it to.

Can I restrict a whole category or shipping class instead of each product?
Yes, and it is the setting most stores miss. Bulk rules let you restrict by category, tag, attribute, or shipping class in one go. If a courier will not carry certain goods to a country, restricting the shipping class once covers every product in it, instead of editing products one by one.

Will hiding products by country hurt my SEO?
It depends on the mode you choose. Hiding a product completely removes it for restricted visitors, which suits compliance. Leaving it visible but non-purchasable keeps the product page and its SEO value while blocking the sale. Pick the mode by whether the restriction is a legal requirement or a fulfilment preference.

Conclusion

Shipping zones tell customers what a delivery costs. They do not stop a customer in a restricted country from filling a cart and paying you for something you cannot legally or practically ship. CBR PRO closes that gap at the catalog, the cart, and the checkout, so the orders you cannot fulfil never reach your dashboard.

🌍 Ready to control which countries can buy from your WooCommerce store?

Set product, category, payment, and shipping restrictions by country in minutes, no code required.

14-Day Money-Back Guarantee. HPOS Compatible. Block Checkout Compatible. Priority Support.