Linux 软件免费装
Banner图

GeoShield - Country Restrictions Lite for WooCommerce

开发者 sabbir37
更新时间 2026年9月21日 18:35
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce block ip geolocation country restrictions product restriction

下载

1.0.1 1.0.0 1.0.2 1.0.3

详情介绍:

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 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: How It Works
  1. Install and activate GeoShield - Country Restrictions Lite.
  2. Edit any WooCommerce product and open the Country Restrictions tab in the Product Data panel.
  3. Toggle on Enable Restrictions, select your mode (Blacklist or Whitelist), and choose your target countries.
  4. Choose your restriction action: Hide Product (catalog removal + direct access control) or Disable Checkout (show product with custom restriction message).
  5. 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: 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:

安装:

  1. Go to Plugins > Add New in your WordPress admin dashboard and search for "GeoShield Country Restrictions".
  2. Click Install Now, then click Activate.
  3. In WooCommerce > Settings > General, ensure Default Customer Location is set to "Geolocate" (recommended for automatic location detection).
  4. Edit any product, click the Country Restrictions tab in the Product Data box, and configure your country rules.
  5. 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.

屏幕截图:

  • Dashboard & Status — High-level overview of store restriction settings and active configuration.
  • Frontend Notice — User-friendly custom notice displayed in place of the Add to Cart button for restricted visitors.
  • Global Options — Storewide visibility defaults and restriction controls under the GeoShield settings menu.
  • Restriction Strategies — Flexible enforcement options to completely hide products, conceal prices, disable checkout, or redirect visitors based on their country.

常见问题:

How does GeoShield detect a customer's country?

GeoShield uses a smart multi-layer detection engine:

  1. It checks Cloudflare's country header (CF-IPCountry) first for instant 0ms edge detection if your site is behind Cloudflare.
  2. It uses WooCommerce's built-in geolocation engine (MaxMind GeoIP2) to resolve the country locally on your server with 99.5% accuracy.
  3. If a customer is at checkout or logged in, their entered billing/shipping country is respected first for maximum checkout precision.
  4. A lightweight fallback API lookup acts as a backup only when local MaxMind is not configured.

Can I restrict a product so only customers from specific countries can buy it?

Yes. Set the restriction rule to Whitelist (Allow Selected) mode, and choose the permitted countries. Customers from any country not on your list will be restricted based on your chosen action (hidden, or visible with checkout disabled).

Can I block specific countries from buying a product?

Yes. Set the restriction rule to Blacklist (Block Selected) mode, and select the countries you wish to block. Customers from those blocked countries cannot buy or view the product, while customers from all other nations can purchase normally.

What happens to restricted customers — do they still see the product?

You have complete control via two restriction actions:

  • Hide Product (Full Restriction): The product is hidden from shop archives, search results, and category pages. Direct single URL visits return a 404 or redirect to the shop page (configurable in Global Settings).
  • Disable Checkout (Lock Purchase): The product remains visible in the catalog, but the Add to Cart button is replaced with your custom restriction notice.

Can I restrict individual product variations by country?

Yes. GeoShield Lite fully supports variation-level restrictions. You can sell Size Large in the United States and Canada while restricting Size Small or specific color options to other countries within the same variable product.

Does GeoShield work with WPML, Polylang, or multilingual setups?

Yes. GeoShield is fully compatible with multilingual plugins including WPML, Polylang, and TranslatePress. Restriction rules configured on a product apply consistently across all language translations.

Will caching plugins interfere with country detection?

If your host or caching plugin serves static HTML pages without recognizing location cookies, country detection can be bypassed. To prevent this, set your WooCommerce customer location setting to "Geolocate (with page caching support)" under WooCommerce > Settings > General, or configure your caching plugin (WP Rocket, LiteSpeed, W3TC) to bypass or vary cache for geolocation cookies.

Does GeoShield work with WooCommerce High-Performance Order Storage (HPOS)?

Yes. GeoShield is 100% compatible with HPOS (custom order tables) and declared compliant using WooCommerce's FeaturesUtil API.

Does GeoShield work with WooCommerce Subscriptions?

Yes. GeoShield supports both simple and variable subscription products, including variation-level restrictions on subscription tiers.

Is GeoShield GDPR compliant?

Yes. GeoShield does not collect, store, or profile personal visitor information. Only an IP address is checked in real-time to identify the geographic country. When WooCommerce's native MaxMind database is active, all geolocation lookups occur locally on your server without sending any data to third-party servers.

Can I restrict entire product categories, tags, or continents at once?

GeoShield Lite is optimized for granular control at the individual product and variation level. If your store requires automated catalog-wide rules by product category, tag, shipping class, or entire continents, you can use GeoShield Country Restrictions Pro.

What is the difference between GeoShield Lite and GeoShield Pro?

  • GeoShield Lite provides everything most WooCommerce stores need: granular country restrictions configured per product or per variation with Blacklist and Whitelist modes, full catalog hiding, or locked checkout notices.
  • GeoShield Country Restrictions Pro is designed for stores with large inventories requiring global catalog automation (by Category, Tag, or Shipping Class), sub-country targeting (continents, states, provinces), Catalog Mode, and automatic regional redirects.
  • If your catalog expands and you need automated storewide rules, you can seamlessly Upgrade to Pro at any time.

更新日志:

1.0.3 1.0.2 1.0.1 1.0.0