=== DP Multiple Addresses for WooCommerce ===

Contributors: devpriyanshu
Tags: woocommerce, addresses, checkout, shipping, saved addresses
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Save multiple addresses in My Account; select one at checkout. Fields adjust by country (WooCommerce locale).

== Description ==

DP Multiple Addresses for WooCommerce lets customers save multiple shipping addresses in My Account and choose one at checkout. The form respects WooCommerce’s country-based locale so state, postcode, and labels match each country (e.g. UAE, US, UK).

**Features:**

* **My Account – Saved Addresses** – New tab where users can add, edit, delete, and set a default address.
* **Address type** – Choose Home, Work, or Others with icon boxes.
* **Country-wise fields** – State/postcode labels and required rules follow WooCommerce locale (e.g. “State” / “ZIP” for US, “Emirate” for UAE). State dropdown when the country has defined states.
* **Checkout** – “Select Saved Address” dropdown above billing/shipping; selected address auto-fills fields via AJAX.
* **Default address** – One default per user; it’s pre-selected on checkout.
* **Compatible** with WooCommerce HPOS (High-Performance Order Storage).

**Requirements:** WooCommerce 6.0+ active.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin folder to `/wp-content/plugins/` or install via WordPress admin (Plugins → Add New → Upload).
3. Activate “DP Multiple Addresses for WooCommerce”.
4. If the Saved Addresses tab shows 404, go to **Settings → Permalinks** and click **Save** once.
5. Users manage addresses under **My Account → Saved Addresses** and select a saved address on checkout.

== Frequently Asked Questions ==

= Do guests see the saved-address dropdown? =

No. Only logged-in users with at least one saved address see the checkout dropdown.

= How do address fields change by country? =

The plugin uses WooCommerce’s country locale. When the user selects a country (e.g. UAE or US), state and postcode labels, required rules, and state dropdown options update to match that country.

= Is this compatible with HPOS? =

Yes. The plugin declares compatibility with WooCommerce’s custom order tables (HPOS) and only uses user meta for saved addresses.

== Screenshots ==

1. My Account – Saved Addresses tab with address list and add/edit form.
2. Type of address: Home, Work, Others (icon boxes).
3. Checkout – Select Saved Address dropdown and auto-filled fields.

== Changelog ==

= 1.0.0 =
* Initial release.
* My Account Saved Addresses tab (add, edit, delete, set default).
* Address type: Home, Work, Others (icon selection).
* Country-wise address fields (WooCommerce locale: state/postcode labels and required).
* Checkout dropdown and AJAX auto-fill.
* HPOS compatibility declared.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
