Check country-zone health and compatibility

Site Health provides bounded checks for the services, configuration, and product index used by country-zone pricing. The checks do not scan the product catalog.

Run the checks

  1. Go to Tools → Site Health → Status.
  2. Find the checks with the POM Country Pricing badge.
  3. Review all nine results:
    • Country pricing WooCommerce runtime
    • Country pricing plugin conflicts
    • Country pricing zone configuration
    • Country pricing geolocation
    • Country pricing proxy trust
    • Country pricing product index
    • Country pricing product-type compatibility
    • Country pricing universal cache safety
    • Country pricing Product Add-Ons execution
  4. Use Open country zone settings when a configuration result needs attention.

Interpret the results

WooCommerce runtime

A good result means the customer, session, country list, and geolocation services are available. A critical result means WooCommerce must be enabled before the zone context can be relied upon.

Plugin conflicts

A critical result means WooCommerce Price Based on Country or its Pro add-on is active. Two country pricing engines must not control the same request, so POM's commercial price and catalog-query filters remain unregistered until the conflicting engine is inactive.

Zone configuration

  • Good: the stored schema, UUIDs, country assignments, enabled fallback, and revision are valid.
  • Recommended: no zones have been created yet.
  • Critical: the stored document is malformed or inconsistent. Open the settings and save a corrected configuration.

Geolocation

  • Good: WooCommerce server-side geolocation can resolve anonymous visitors before the base-country fallback.
  • Recommended: WooCommerce uses the store base address or AJAX geolocation as its customer-location mode. The resolver still asks WooCommerce for a server-side IP country before using the store base country, but anonymous first responses and WooCommerce customer defaults need a deliberate cache strategy before regional prices are introduced.

Country lookup uses WooCommerce's configured server-side geolocation data. It does not make a storefront request wait for an outbound external-IP lookup; when the configured data cannot resolve the trusted customer address, the normal store-base fallback applies.

Proxy trust

  • Good: the request reaches the origin directly, or strict mode accepts a valid customer address from an explicitly trusted immediate proxy.
  • Recommended — compatibility mode: no trusted proxy ranges are configured and POM accepts a valid X-Real-IP value or the first valid address in X-Forwarded-For. This preserves zero-configuration WooCommerce compatibility, but it cannot prove that the forwarding header was written by the store's infrastructure.
  • Recommended — strict mode: trusted proxy ranges are configured, but the immediate proxy or supplied address chain cannot be validated. POM ignores the forwarding header and uses the direct origin peer address.

The result never displays or stores visitor or proxy addresses.

Compatibility mode is the default. It chooses the first available valid address in this order:

  1. X-Real-IP.
  2. The first comma-separated address in X-Forwarded-For.
  3. The direct REMOTE_ADDR origin peer.

The selected address is used only as an input to country resolution. Prices and purchase requests are still recalculated by the server, the confirmed WooCommerce customer or checkout country takes precedence, and WooCommerce's effective selling-country list remains authoritative. However, a visitor who can supply an accepted forwarding header may temporarily select another zone's price, availability, Product Add-On, or Composite configuration. Use strict mode when those differences require an authenticated infrastructure boundary.

To enable strict mode for the WordPress installation, define at least one exact proxy address or CIDR range and select the header that the trusted edge overwrites:

define( 'POM_TWEAKS_COUNTRY_ZONE_PRICING_TRUSTED_PROXIES', [ '203.0.113.0/24' ] );
define( 'POM_TWEAKS_COUNTRY_ZONE_PRICING_PROXY_HEADER', 'HTTP_CLOUDFRONT_VIEWER_ADDRESS' );

Replace the example range with addresses owned by the deployment. Supported selected headers are HTTP_X_FORWARDED_FOR, HTTP_X_REAL_IP, HTTP_CF_CONNECTING_IP, and HTTP_CLOUDFRONT_VIEWER_ADDRESS. Once at least one valid trusted range exists, POM automatically stops using compatibility mode. For X-Forwarded-For, strict mode walks the chain from the origin back to the first address that is not a trusted proxy.

On multisite, wp-config.php constants apply to every site in that WordPress installation. Leaving the constants undefined keeps zero-configuration compatibility mode on every site.

Product index

  • Good: the current site's versioned product index is ready and the last rebuild has no reported errors.
  • Recommended: the index has not been rebuilt, or a bounded rebuild is queued, running, or deliberately paused. Editing can continue while it finishes.
  • Critical: the index is unavailable or a product failed validation during synchronization. Run the site-scoped reindex command and review the reported product.

Product-type compatibility

  • Good: every product type observed by the runtime belongs to a supported family.
  • Recommended: a custom product type reached the engine. That type deliberately kept its normal WooCommerce price; review the listed type before rollout.

Universal cache safety

  • Good: public price markup can use one shared neutral page and the regional response is private and non-cacheable.
  • Recommended: keep product and catalog pages outside the shared page cache. The result lists conservative reason codes for a missing client, conflicting geolocation mode, unsupported product type, or active pricing integration that does not yet provide neutral public data.

After a legacy migration, a recommended result may list rollout_cache_bypass even when every technical surface is compatible. This means the production rollout owner has not yet approved universal shared HTML, or has deliberately returned the site to bypass mode. Keep the bypass in place until the operational review is complete.

The compatibility proxy warning does not by itself block universal HTML. The shared page remains country-neutral and the regional response remains private and non-cacheable. A failed chain does block universal HTML after strict proxy mode has been configured, because that deployment explicitly requires authenticated forwarding.

Follow Understand universal price loading before enabling shared caching for WooCommerce product surfaces.

Product Add-Ons execution

  • Good: no legacy Product Add-Ons country-pricing callback can run beside the POM bridge.
  • Critical: Price Based on Country Pro is active. The POM bridge remains bypassed to prevent a second conversion; keep it bypassed until the legacy integration is inactive and the reviewed regional Product Add-Ons document is ready.

Verify context behavior

Use a staging site or a controlled administrator preview supplied by a compatible POM feature.

  1. Check a country assigned to an enabled zone and confirm a representative override, sale, unavailable product, and variable range.
  2. Check a country not assigned to any zone and confirm it follows the selected fallback-price display policy.
  3. Check a country outside WooCommerce's effective selling-country list and confirm purchase is blocked even if a fallback price is visible.
  4. Compare ascending and descending price order, minimum and maximum price filters, and on-sale products in both zones.
  5. Confirm a future sale uses its regular amount and has scheduled start and end actions.
  6. Disable a non-fallback zone and confirm its countries use the fallback.
  7. Repeat the checks on each WooCommerce subsite that enables the tool.

Changing the resolved zone must change only that zone's effective values. Returning to the first zone must restore its original values without variation-cache contamination.

Recovery

If a health result becomes critical after a settings change, correct the zone rows and save again. If immediate rollback is required, disable Country pricing zones under Settings → POM Tweaks → E-Commerce → Products. A disabled tool registers no regional price, catalog-query, context, or diagnostic hooks and leaves its site-specific configuration available for later correction.

For index recovery, follow Reindex country-zone product prices. The explicit command validates the catalog in bounded batches while routine Site Health remains bounded.