=== Express AI - Kolay Gelsin İl İlçe ===
Contributors: expressai
Tags: woocommerce, expressai, kolay gelsin, checkout, address
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turns the WooCommerce checkout address fields into dependent Province → District select boxes powered by Express AI / Sendeo (Kolay Gelsin) data.

== Description ==

Your customers can only select provinces and districts recognized by Express AI on the checkout page. As a result, your orders reach Express AI with 100% consistent `city` / `district` (+ `cityId` / `districtId`) information and Kolay Gelsin shipments are created without errors.

= Features =

* The province (state) list is replaced with Express AI province names; the district field becomes a dynamic select box bound to the selected province.
* Data source: the public Express AI `sendeo-cities` service (`GET /api/marketplace-integrations/custom-api/sendeo-cities`). The data is stored on your site, refreshed automatically once a day (the service is rate limited to 5 requests per minute per IP) and can be refreshed manually from the settings page.
* Server-side validation: if the submitted district is not in the Express AI list for the selected province, the order cannot be completed.
* `_eai_city_id` / `_eai_district_id` meta is written to the order; the "Express AI - Sipariş Entegrasyonu" plugin forwards these IDs to Express AI as `shipmentAddress.cityId/districtId`.
* Similar province/district or address field plugins are detected automatically and you are notified that they must be deactivated.
* If the WooCommerce Blocks checkout is detected, a notice is shown explaining that the classic `[woocommerce_checkout]` shortcode must be used instead.
* When a country other than Turkey is selected, the district field falls back to a regular free-text input.
* Can be applied to the billing and/or shipping address; also works on the My Account address edit page.

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the WordPress admin panel (WooCommerce must be installed). Province/district data is fetched automatically on activation.
3. Check the status on the WooCommerce → Express AI İl İlçe page.

== Frequently Asked Questions ==

= The select boxes are not visible =

1. Check the data status on the WooCommerce → Express AI İl İlçe page; if there is no province/district data, start the sync with "Update Now".
2. If you use a similar province/district or address field plugin, deactivate it (the plugin detects known plugins and warns you; the same rule applies to plugins it cannot detect).
3. If your checkout page uses the WooCommerce Blocks checkout, switch to the classic `[woocommerce_checkout]` shortcode.

= Will my customers' saved addresses break? =

No. The province list keeps using the standard WooCommerce TR state keys (such as TR34, TR06); only the visible names are synchronized with the Express AI data.

== External services ==

This plugin connects to the public Express AI service (https://expressai.com.tr) to download the up-to-date province/district list.

* **What is sent:** no personal or site data is sent; only the province/district list is downloaded via a `GET /api/marketplace-integrations/custom-api/sendeo-cities` request.
* **When it is sent:** on plugin activation, once a day during the automatic sync, and when "Update Now" is clicked manually on the settings page.
* **Service provider:** Express AI (https://expressai.com.tr)
* [Privacy Policy](https://expressai.com.tr/gizlilik-politikasi)

== Changelog ==

= 1.0.1 =
* Text domain aligned with the plugin slug (express-ai-kolay-gelsin-il-ilce) — WordPress.org directory requirement.
* readme rewritten in English; added "External services" statement.
* Tested with WordPress 7.0.

= 1.0.0 =
* Initial release.
