=== Codnix Dhaka Shipping Selector for WooCommerce ===
Contributors:      codnix
Tags:              woocommerce, shipping, dhaka, checkout, bangladesh
Requires at least: 5.8
Tested up to:      6.5
Requires PHP:      7.4
WC requires at least: 6.0
WC tested up to:   8.9
Stable tag:        1.0.0
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Adds a clean, AJAX-powered Inside / Outside Dhaka shipping area selector to the WooCommerce checkout page.

== Description ==

Dhaka Shipping Selector lets your customers choose between **Inside Dhaka** and **Outside Dhaka** delivery
directly on the checkout page. The shipping fee updates **instantly** via WooCommerce's built-in fragment
refresh — no page reload required.

= Features =
* Modern card-style radio selector on checkout
* AJAX-powered instant fee update
* Admin-configurable fees (default: ৳80 inside / ৳180 outside)
* Free shipping threshold option (Inside Dhaka only)
* Fully customisable labels from WooCommerce Settings
* Saves selected zone to order meta — visible in admin, customer account & order emails
* OOP PHP architecture — clean, lightweight, no jQuery bloat beyond what WooCommerce ships
* Compatible with Elementor checkout layouts and SBMart theme
* HPOS (High-Performance Order Storage) compatible
* Translation-ready (.pot included)

== Installation ==

= Automatic =
1. In your WordPress dashboard go to **Plugins → Add New**.
2. Click **Upload Plugin** and choose `dhaka-shipping-selector.zip`.
3. Click **Install Now** → **Activate Plugin**.

= Manual =
1. Upload the `dhaka-shipping-selector` folder to `/wp-content/plugins/`.
2. Activate the plugin via the **Plugins** menu in WordPress.

= Configuration =
After activating:
1. Go to **WooCommerce → Settings → Shipping → Dhaka Shipping**.
2. Set your Inside / Outside Dhaka fees and any custom labels.
3. Save changes — the selector is live on your checkout immediately.

== Frequently Asked Questions ==

= Does this work with WooCommerce HPOS? =
Yes. The plugin declares full compatibility with WooCommerce's High-Performance Order Storage (custom order tables).

= Does this work with Elementor's checkout widget? =
Yes. The field is injected via the `woocommerce_after_order_notes` hook which fires inside Elementor's checkout
widget. The JS re-binds after every `updated_checkout` event so the UI stays functional after Elementor re-renders.

= Can I rename Inside / Outside Dhaka? =
Yes — go to **WooCommerce → Settings → Shipping → Dhaka Shipping** and edit the label fields.

= Will the selected zone appear in order emails? =
Yes. The chosen area is saved as order meta and surfaced in admin order details, customer order pages, and all
WooCommerce order emails.

= How does the free shipping threshold work? =
Set a cart subtotal amount in the **Free Shipping Threshold** field. When the customer's cart subtotal meets or
exceeds that value AND they select **Inside Dhaka**, the Inside Dhaka fee drops to ৳0. Outside Dhaka is always
charged at the configured fee regardless of cart value.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
First release — no upgrade steps required.
