=== Technoviable Bangladesh Location Dropdown for WooCommerce ===
Contributors: hossainawlad, shamimakter
Tags: woocommerce, bangladesh, checkout, city dropdown, district
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Searchable District & Upazila/Thana dropdowns for WooCommerce checkout, in Bangla and English, plus a built-in Checkout Field Manager.

== Description ==

Technoviable Bangladesh Location Dropdown for WooCommerce makes WooCommerce checkout faster, friendlier, and more accurate for
Bangladeshi customers — from picking their exact address to customizing the
entire checkout form, all in a single plugin.

= Why Choose Technoviable Bangladesh Location Dropdown for WooCommerce =

* **Bangla + English, in one dropdown** — Every location is shown in both
  languages, so customers who aren't comfortable with English can instantly
  recognize their own area in Bangla.
* **Deep, detailed location data** — All 64 districts of Bangladesh, with
  over a 1350+ areas and thanas mapped underneath.
* **Fast, searchable dropdowns** — Customers simply type to find their area
  instead of scrolling long lists.
* **Built-in Checkout Field Manager** — Reorder checkout fields with
  drag-and-drop, show or hide any field, mark fields as required, or rename
  labels, no separate plugin needed.
* **Correct district names everywhere** — Order details, invoices, and
  emails always display the real district name instead of an internal code.

= Who It's For =

Any WooCommerce store operating in Bangladesh, especially stores serving
customers outside major cities where English fluency at checkout can't be
assumed.

= Important Note =

The District → Area dropdown currently works with the classic
(shortcode-based) WooCommerce checkout. Support for the block-based
checkout is planned for a future release.

Do not disable the "Country / Region" field from the Checkout Field
Manager settings. WooCommerce relies on this field to determine
shipping zones and calculate shipping costs correctly. Disabling it
will also prevent the district name from being recorded and displayed
in the order details.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/technoviable-bangladesh-location-dropdown`,
   or install the plugin directly through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to WooCommerce > City Dropdown.
4. Check "Enable the Bangladesh District -> Area/Thana dropdown" if you
   want the location dropdown feature.
5. Optionally reorder, hide, or rename checkout fields from the same screen.

== Frequently Asked Questions ==

= Does this work with the block-based checkout? =

Not yet. The District/Area dropdown currently supports the classic
(shortcode) checkout only. Block checkout support is planned.


= Can I use only the Checkout Field Manager without the location dropdown? =

Yes. The Bangladesh District/Area dropdown is optional and can be turned
on or off from the settings screen independently of the field manager.

= Does this require any external API? =

No. All location data ships with the plugin as a local file — no external
requests are made for the dropdown to work.

= Can I disable the "Country / Region" field? =

No, this field should always stay enabled. WooCommerce uses it to
determine the correct shipping zone and calculate shipping costs. If
it is disabled, shipping address detection breaks, and the district
name will no longer appear correctly in the order details, emails, or
admin order screen.

== Screenshots ==

1. Checkout Field Manager settings screen.
2. District and Area/Thana dropdown on the checkout page, showing Bangla
   and English names together.

== Changelog ==

= 1.2.0 =
* Renamed the plugin to "Technoviable Bangladesh Location Dropdown for WooCommerce" and changed the plugin slug to `technoviable-bangladesh-location-dropdown`.
* The checkout District/Area dropdown JavaScript is now loaded from a properly enqueued asset file instead of being printed inline inside the checkout markup.
* Location data is passed through `wp_json_encode()` with `JSON_HEX_TAG`, and the inline payload is about 38% smaller because Bangla names are no longer escaped to `\uXXXX` sequences.
* Fixed a case where WordPress could silently skip the checkout script when WooCommerce's enhanced-select asset had not been registered.
* Declared WooCommerce as a required plugin via the "Requires Plugins" header.
* Hardened the settings save handler: input is now unslashed with `wp_unslash()` before sanitization, and malformed submissions are ignored instead of triggering PHP warnings.

= 1.0.0 =
* Initial release.
* Checkout Field Manager: reorder, show/hide, and relabel checkout fields.
* Bangladesh District -> Area/Thana searchable dropdown, in Bangla and
  English.
* Correct district names shown in order details, emails, and My Account
  regardless of the internal code stored.

== Upgrade Notice ==

= 1.2.0 =
Plugin renamed to "Technoviable Bangladesh Location Dropdown for WooCommerce". The checkout District/Area dropdown now loads from an enqueued asset file rather than inline code.

= 1.0.0 =
Initial release.

== Credits ==

* The District/Area dataset was originally adapted from an open-source
  Bangladesh Thana/Upazila dropdown project for WooCommerce. District
  spelling corrections and Bangla-language area names were added by
  Technoviable.
* This plugin is distributed under the GNU General Public License v2 or
  later.