=== LW Postcode Autofill for WooCommerce ===
Contributors: lindalove70
Tags: woocommerce, checkout, postcode, taiwan, address
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce 結帳地址小幫手，輸入 3 碼郵遞區號後自動帶入縣市與鄉鎮市區，秒填地址讓結帳更便捷。

== Description ==

想無痛提升轉換率？讓結帳一氣呵成就可以！LW Postcode Autofill for WooCommerce 是專為台灣 WooCommerce 商店設計的結帳小幫手。結帳時僅輸入 3 碼郵遞區號，系統自動帶入縣市與鄉鎮市區，更直覺且大幅降低人工輸入錯誤。

現在支援台灣、香港、澳門、馬來西亞、新加坡，不支援的國家或地區會維持 WooCommerce 原生地址流程，不強制套用台灣地址格式。

此版本主要支援 WooCommerce Classic Checkout，保留原本的結帳、付款與訂單流程。WooCommerce Checkout Blocks are not currently supported.

LW Postcode Autofill for WooCommerce does not modify the WooCommerce payment flow, does not change Apple Pay behavior, does not change LINE Pay or credit card payment lifecycles, does not modify order status lifecycle, and keeps WooCommerce HPOS compatibility declarations intact.

If WooCommerce is not active, if the checkout type cannot be confirmed, or if the checkout page uses Checkout Block, the helper stays conservative and does not load classic checkout field logic.

Key behavior:

* Taiwan shoppers can enter a 3-digit postcode to autofill city and district.
* Singapore and Malaysia postcode validation stays focused on the expected local postcode length.
* Unsupported countries fall back to WooCommerce native address fields.
* CVS pickup address requirements are kept separate so store-pickup flows can remain owned by the CVS pickup plugin.
* Payment gateways continue to own payment sheet, authorization, failure, and success behavior.

== Features ==

* Taiwan 3-digit postcode autofill for WooCommerce Classic Checkout.
* City and district autofill for matching Taiwan postcode data.
* Mobile friendly checkout field behavior.
* Safari and Chrome compatible field interactions.
* Conservative fallback for unsupported countries.
* HPOS compatibility declaration for WooCommerce stores.
* Settings page for enabling or disabling the helper.
* No payment gateway lifecycle changes.

== Installation ==

1. In WordPress admin, go to Plugins > Add New.
2. Install the plugin from WordPress.org, or upload the plugin ZIP provided by LoveWoo.
3. Activate the plugin.
4. In the WordPress left menu, open the LW Postcode Autofill for WooCommerce settings page. In Traditional Chinese admin, the menu label appears as 自動帶地址.
5. Make sure the helper is enabled.
6. Visit the checkout page and test the postcode flow by entering a Taiwan 3-digit postcode.

== Frequently Asked Questions ==

= Which countries or regions are supported? =

The current supported regions are Taiwan, Hong Kong, Macau, Singapore, and Malaysia.

= What happens for unsupported countries? =

Unsupported countries keep the native WooCommerce address flow. The plugin does not force Taiwan-specific postcode behavior on overseas customers.

= Does this plugin modify the WooCommerce payment flow? =

No. The plugin focuses on postcode and address helper behavior. It does not modify payment flow, order status lifecycle, or payment gateway callbacks.

= Does this affect Apple Pay, LINE Pay, or credit card payments? =

It is not designed to change Apple Pay, LINE Pay, or credit card payment lifecycles. The checkout payment flow remains owned by the active WooCommerce payment gateway.

= Does this plugin support HPOS? =

Yes. The plugin declares compatibility with WooCommerce High-Performance Order Storage (HPOS). It does not handle order lifecycle or directly operate on WooCommerce order storage.

= Does this plugin support WooCommerce Checkout Blocks? =

Not currently. This version focuses on WooCommerce Classic Checkout. If your checkout page uses Checkout Block, the plugin keeps classic checkout field logic disabled to avoid affecting the checkout flow.

= Does this affect convenience-store pickup plugins? =

The plugin keeps CVS pickup address requirements separate. Convenience-store pickup details should remain owned by the store-pickup plugin, while this plugin focuses on postcode and address behavior for supported checkout flows.

== Screenshots ==

1. Entering a Taiwan three-digit postcode in the checkout address block.
2. After the full postcode is entered, city and district fields are autofilled.

== Changelog ==

= 1.1.2 =
* Initial public release.
* Adds postcode-assisted checkout fields for Taiwan, Hong Kong, Macau, Singapore, and Malaysia.
* Helps reduce address entry friction in WooCommerce Classic Checkout.
* Keeps unsupported countries on the native WooCommerce address flow.
* Does not modify payment flow, Apple Pay, or order status lifecycle.
