=== CDA City Shipping for WooCommerce ===
Contributors: chameleondigital
Tags: woocommerce, shipping, checkout, e-commerce, delivery
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Set shipping fees per city, show city dropdowns at checkout, and ship with a dedicated WooCommerce shipping method.

== Description ==

City Shipping for WooCommerce helps stores that charge different delivery fees by city.

* **Admin** — Under WooCommerce → City shipping, add cities and a fee for each.
* **Checkout** — When more than one city is configured, billing and shipping city fields become dropdowns so customers pick a listed city.
* **Shipping** — Enable **City based shipping** in WooCommerce → Settings → Shipping (your zone). The rate matches the customer’s shipping city (or billing city when shipping to the same address).
* **WPML** — City labels can be translated in WPML String Translation while order values stay consistent.
* **HPOS** — Declares compatibility with WooCommerce custom order tables (HPOS).

Requires **WooCommerce** to be installed and active (WordPress 6.5+ can enforce this via the plugin dependency header).

== Installation ==

1. Upload the `cda-city-shipping-for-woocommerce` folder to `/wp-content/plugins/` (or install from a zip named `cda-city-shipping-for-woocommerce.zip` that contains that folder) or use the WordPress Plugins screen.
2. Activate **City Shipping for WooCommerce** through the Plugins menu.
3. Install and activate **WooCommerce** if it is not already.
4. Go to **WooCommerce → City shipping** and add your cities and fees.
5. Go to **WooCommerce → Settings → Shipping**, open your zone, and add the **City based shipping** method.

== Frequently Asked Questions ==

= How do I set the delivery price for each city? =

Add one row per city under **WooCommerce → City shipping** (city name and fee). Then add **City based shipping** to your shipping zone (**WooCommerce → Settings → Shipping**). At checkout, the customer’s shipping city (or billing city when not shipping elsewhere) must match a configured row; the plugin uses that row’s fee for the City based shipping rate.

= Does this work with the checkout block? =

The plugin targets the classic WooCommerce checkout fields API. Test your checkout experience (shortcode vs block) before going live.

= How do I translate city names? =

With WPML active, register strings under String Translation for the `cda-city-shipping-for-woocommerce` context.

== Screenshots ==

1. City shipping settings under WooCommerce.
2. City dropdowns on checkout (when multiple cities are configured).

== Changelog ==

= 1.0.3 =
* Rename the main plugin file to `cda-city-shipping-for-woocommerce.php` to match the WordPress.org plugin slug (use zip `cda-city-shipping-for-woocommerce.zip` and top-level folder `cda-city-shipping-for-woocommerce` when packaging).

= 1.0.2 =
* Readme: remove template FAQ; add end-user FAQ for configuring cities and fees.
* Security: verify WooCommerce checkout AJAX / submit nonces before reading checkout POST; restrict admin save to the City shipping screen.

= 1.0.1 =
* Plugin Check and WordPress.org readiness (textdomain, admin scripts, security-related PHPCS notes, readme).
* Add readme.txt, languages template (POT), uninstall handler, and directory index files.
* Fix checkout validation callback argument order.
* Improve cheque/check payment zero-shipping behavior with shipping cache invalidation.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.3 =
Main file and package names aligned with the plugin directory slug.

= 1.0.2 =
Documentation and security hardening for directory review.

= 1.0.1 =
Maintenance and compatibility improvements.
