Skip to content

Cookbook › WooCommerce

Add a shipping zone and flat rate

WooCommerce3 minutesChangesTested 20 Oct 2026
Paste into ChatGPT or ClaudeOn my test store, create a new zone “QA Shipping” covering only country US and postcode 00000. Add an enabled flat-rate method costing 5.00. Preserve all existing zones. For the location update, use the flat body {"0":{"code":"US","type":"country"},"1":{"code":"00000","type":"postcode"}}, without a locations wrapper. Read back the saved country, postcode, method, cost and enabled state. If the restrictions did not save, leave the new method disabled and report the problem.

Changes content or settings on your site. See the recipe below for approval requirements. Read only cannot make changes.

  1. Your assistant reads the current zones and creates the new named zone without editing the others.
  2. It saves the country and postcode restrictions, reads them back, and checks that both match your request.
  3. It adds the flat-rate method and checks the saved cost and enabled state. If restrictions are missing, it leaves the new method disabled.
  • Replace the synthetic country, postcode and cost with the exact destination and amount you need. The cost uses your store currency.
  • WooCommerce chooses the first matching zone. Review existing zone locations and order for overlap before using a new zone on a live store. The tests verified saved configuration, not checkout selection or shipping-tax calculations.
  • Shipping locations need a flat request body. Assistant guidance: for /wc/v3/shipping/zones/{id}/locations, send {"0":{"code":"US","type":"country"},"1":{"code":"00000","type":"postcode"}} through the current object-body tool. Do not wrap it in locations. A wrapped request returned HTTP 200 but saved no restrictions in testing, so always read the locations back before enabling a method.
  • Zone creation, location update and method changes use separate website actions. ChatGPT passed after correcting the body shape; Claude passed with the flat body. Tested on AI Puffer 2.5.14 and WooCommerce 11.2.1.

Need a variation of this recipe, or a different one? Request a recipe