Documentation
GeoBlock
Overview

WindCodex GeoBlock

Overview

WindCodex GeoBlock lets you restrict WooCommerce products by country using IP-based geolocation - no API key or third-party account required. Rules are set directly on each product, and a single global setting controls how the restriction is enforced across your store.

What you can do

  • Hide products entirely from customers in specific countries (shop, search, categories, and single product pages).
  • Show products in the catalog but prevent purchase on the product page.
  • Display a custom message in place of the price and Add to Cart button.
  • Redirect blocked visitors to any URL of your choice instead of a 404 page.
  • Choose include or exclude mode per product - whitelist allowed countries or blacklist blocked ones.

How it works

Visitor lands on store


GeoBlock detects country (shipping address → billing address → session → IP)


Is the product restricted for this country?
    ├-- No  →  Normal WooCommerce behaviour
    └-- Yes →  Apply global Restriction Mode
                 ├-- Hide         →  Product invisible; direct URL returns 404 or redirects
                 ├-- Catalog Only →  Hidden from listings; direct URL loads (purchase blocked)
                 └-- Message      →  Visible everywhere; price + ATC replaced with custom message

Requirements

RequirementMinimumRecommended
WordPress5.8Latest stable
WooCommerce7.0Latest stable
PHP7.48.1+
WooCommerce GeolocationEnabled"Geolocate (with page caching support)"

WooCommerce downloads the MaxMind GeoLite2 database only when geolocation is enabled in WooCommerce → Settings → General → Default customer location. Without it, guest visitors cannot be geolocated by IP and will fall back to the store base country.