Hide, redirect, and block checkout for a WooCommerce category when visitors are from Australia or New Zealand using Cloudflare’s CF-IPCountry.
- Hides products in the restricted category from shop, archives, search, shortcodes, widgets, blocks.
- Redirects AU/NZ visitors away from the category page and any single product in that category → to the Shop page.
- Blocks add-to-cart via any method (buttons, AJAX,
?add-to-cart=ID, REST). - Cleans up saved carts and double-checks at checkout.
- Adds
Vary: CF-IPCountryto keep caches/CDNs from mixing countries.