GeoShield - Country Restrictions Lite for WooCommerce lets you control exactly which products are visible and purchasable based on your customer's country — using fast, privacy-first geolocation with zero configuration required.
Whether you are dealing with territorial licensing agreements, cross-border shipping limitations, regional export compliance regulations, or localized product lines, GeoShield gives you granular control over your product catalog by country — without writing a single line of code.
Need to automate catalog visibility at scale across categories, tags, or entire continents? Explore
GeoShield Country Restrictions Pro for automated global rules and smart geo-tools.
HPOS Compatible ·
WooCommerce Blocks Ready ·
Cloudflare & CDN Friendly ·
100% Privacy & GDPR Safe
What You Can Do
- Restrict products per country — Choose between Blacklist (block selected countries) or Whitelist (allow only selected countries) directly inside the WooCommerce product editor.
- Two flexible restriction actions — Choose what happens when a customer visits from a restricted country:
- Hide Product (Full Restriction) — Automatically removes the product from the shop catalog and search results. Direct single-product URL visits cleanly return a 404 page or redirect to the shop page.
- Disable Checkout (Lock Purchase) — Keeps the product visible in the catalog, but locks purchasing by removing the Add to Cart button and displaying a custom restriction notice.
- Variation-level country restrictions — Apply independent restriction rules to individual product variations. Sell specific sizes, colors, or options globally while restricting others within the same variable product.
- Fast, multi-layer geolocation engine — Detects visitor country instantly:
- Checks Cloudflare's country header (
CF-IPCountry) first for instant 0ms edge detection.
- Uses WooCommerce's native MaxMind GeoIP2 integration for accurate local server detection.
- Gracefully falls back to IP geolocation if MaxMind is not configured.
- Includes automated localhost detection so developers can test rules locally without configuration.
- Custom restriction messages — Set personalized notices per product or per variation explaining to restricted shoppers why the item is unavailable in their location.
- Global fallback settings — Set a storewide fallback restriction message and configure direct URL access behavior (Return 404 or Redirect to Shop).
- Multi-layer catalog & checkout protection — Enforces restrictions across shop loops, product archives, search results, single product templates, cart additions, and checkout submissions.
- WooCommerce Blocks & Classic ready — Works seamlessly with both classic shortcodes and the new WooCommerce Cart & Checkout blocks via the WooCommerce Store API.
- HPOS Compatible — Fully certified for WooCommerce High-Performance Order Storage (custom order tables).
- Privacy-first & GDPR compliant — Uses local MaxMind geolocation first. No customer personal data (names, emails, addresses) is ever collected, stored, or transmitted.
Upgrade to GeoShield Country Restrictions Pro
While GeoShield Lite provides complete control over individual products and variations, high-volume stores managing large catalogs or regional distribution networks can optionally
Upgrade to Pro for automated, catalog-wide geographic control:
- Automated Global Catalog Rules: Restrict whole product lines instantly by Product Category, Product Tag, or Shipping Class — zero individual product setup required.
- Continent, State & Province Targeting: Restrict or whitelist entire continents, states, and provinces worldwide with granular regional accuracy.
- Catalog Mode (Hide Price & Add to Cart): Keep product pages visible and indexed for global SEO while disabling prices and purchase actions for restricted countries.
- Smart Geo-Forwarding & Auto-Redirects: Seamlessly redirect shoppers from restricted locations to designated localized regional domains or custom URLs.
- Role-Based B2B Restrictions: Define rules by WordPress user role (e.g., allow Wholesale / B2B buyers while restricting retail guests).
- Shipping Class & Freight Controls: Apply custom geographic restrictions to heavy freight, fragile goods, or restricted carrier zones.
- Priority Technical Support: Direct, premium assistance from senior WooCommerce plugin engineers.
How It Works
- Install and activate GeoShield - Country Restrictions Lite.
- Edit any WooCommerce product and open the Country Restrictions tab in the Product Data panel.
- Toggle on Enable Restrictions, select your mode (Blacklist or Whitelist), and choose your target countries.
- Choose your restriction action: Hide Product (catalog removal + direct access control) or Disable Checkout (show product with custom restriction message).
- Save the product. Customers visiting from restricted locations will automatically experience your configured rules.
Compatible With
GeoShield is built strictly to WordPress and WooCommerce coding standards and is tested for compatibility with:
- Multilingual plugins — WPML, Polylang, TranslatePress, Weglot
- Page builders — Elementor, Divi, Beaver Builder, Gutenberg Block Editor
- Search plugins — Advanced Woo Search, Relevanssi, FiboSearch
- Caching plugins — WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, SiteGround Optimizer
- Multi-currency plugins — Works harmoniously with WooCommerce currency switchers
- WooCommerce Subscriptions — Variation-level and product-level restrictions supported on subscription products
Important Note for Caching
Caching plugins and Content Delivery Networks (CDNs like Cloudflare) can sometimes cache full HTML pages. To ensure geolocation restrictions take effect instantly:
- Ensure your caching plugin is set to vary cache by WooCommerce's geolocation cookie (
woocommerce_geo_hash).
- Alternatively, enable "Geolocate (with page caching support)" under WooCommerce > Settings > General. This allows WooCommerce to handle country detection via an unobtrusive AJAX endpoint on cached pages.
- If using Cloudflare, GeoShield automatically leverages Cloudflare's
CF-IPCountry header for instant, zero-latency detection.
- Go to Plugins > Add New in your WordPress admin dashboard and search for "GeoShield Country Restrictions".
- Click Install Now, then click Activate.
- In WooCommerce > Settings > General, ensure Default Customer Location is set to "Geolocate" (recommended for automatic location detection).
- Edit any product, click the Country Restrictions tab in the Product Data box, and configure your country rules.
- Navigate to GeoShield > Settings in your WordPress sidebar to manage global settings and default restriction messages.
Alternatively, upload the
geoshield-country-restrictions-lite folder directly to your
/wp-content/plugins/ directory and activate it through the WordPress Plugins screen.