Description
Since 1 July 2025 Vietnam has 34 provinces / cities and no district level. Freeday Vietnam Address brings that official list to your site:
- Province field for Vietnam (WooCommerce “state”) with stable keys (HCM, HN…) that never change, so shipping zones keep working.
- Ward / commune picker: the “city” field opens a searchable list of the chosen province — typing without accents works (“ben thanh” Phường Bến Thành), keyboard friendly. Block checkout, cart, classic checkout and My Account.
- Server-side check: a Vietnamese address must use a ward of its province; close spellings are corrected to the official name. The 5-digit official code is saved on the order and the customer, and shown on the order screen.
- Any form: the same picker works on forms of other plugins and themes (see Developers).
- Field order country province ward street; postcode hidden (both optional).
- REST API (read-only, public): provinces, wards with search, lookup — for any form, theme or app.
- No external requests: the data ships with the plugin.
- English interface with a bundled Vietnamese translation.
Data source and licence
The list comes from the Registry of administrative units of the General Statistics Office (Cục Thống kê, Bộ Tài chính): https://danhmuchanhchinh.nso.gov.vn/. Codes follow Decision 19/2025/QĐ-TTg and later resolutions. Settings Vietnam Address shows the date the data is valid for.
The names and codes of administrative units are set by legal documents of the State. Under Article 15 (clauses 2 and 3) of Vietnam’s Law on Intellectual Property, legal and administrative documents and figures are not protected by copyright, and the registry publishes no other terms of use. The plugin only converts the official list to JSON (it does not change names or codes), and those files are distributed with the plugin under the GPLv2 or later licence.
External services
None. The plugin does not connect to any external service. The data is read from files inside the plugin, and the checkout script loads them from your own site. The data source above is only used by the plugin authors when they prepare a new release.
Privacy
The plugin does not collect, track or send any data. On orders and customer accounts it saves the official 5-digit code of the billing / shipping ward (meta _vafw_billing_ward, _vafw_shipping_ward) next to the address WooCommerce already stores.
Developers
Other plugins and themes can build on the data instead of shipping their own copy. Everything below is a stable public API (VAFW_API_VERSION, currently 1); check for it with defined( 'VAFW_API_VERSION' ) or the vafw_loaded action.
- Full reference: https://opens.freedayos.com/docs/freeday-vietnam-address/
-
Source code, the data build script and issues: https://github.com/opens-freeday/freeday-vietnam-address
-
PHP:
vafw_provinces(),vafw_get_province( $key_or_code ),vafw_wards( $province ),vafw_get_ward( $code ),vafw_find_ward( $province, $text ),vafw_enqueue_picker(). - REST (
/wp-json/freeday-vietnam-address/v1):GET /provinces,/provinces/{key|code}/wards?search=,/lookup?province=&ward=,/wards/{code},/meta. - Picker on any form: call
vafw_enqueue_picker(), then<input data-vafw-ward data-vafw-province="#province" data-vafw-code="#ward-code">; orwindow.vafw.attach( input, { province, country, code } ). Alsowindow.vafw.wards( province )andwindow.vafw.find( province, text ). - Actions:
vafw_loaded. - Filters:
vafw_settings,vafw_woocommerce_enabled(return false to handle the WooCommerce address fields yourself),vafw_find_ward,vafw_address_format,vafw_load_picker,vafw_rest_enabled,vafw_data_dir,vafw_data_url. - Meta (orders and customers):
_vafw_billing_ward,_vafw_shipping_ward(5-digit official code). Province = WooCommerce state key (HCM, HN…), ward name = city field.
Coming from “Vietnam Address Units” (vn-address)?
Same province keys and address format. On activation the old settings are copied over; deactivate the old plugin (while both are active this one stays out of the way and shows a notice).
Screenshots



Installation
- Upload the
freeday-vietnam-addressfolder to/wp-content/plugins/(or Plugins Add New Upload). - Activate it. With WooCommerce, Vietnam addresses use the new fields right away.
- Optional: Settings Vietnam Address.
FAQ
-
Do I need WooCommerce?
-
No. Without WooCommerce the data is available through the PHP functions and the REST API.
-
How is the data updated?
-
When the State changes administrative units, a new plugin version ships updated data. Province keys never change.
-
Is the REST API public?
-
Yes, on purpose: it only returns the public list of administrative units and never writes anything. Turn it off in Settings Vietnam Address or with the
vafw_rest_enabledfilter. -
Where can I get help?
-
- Documentation: https://opens.freedayos.com/docs/freeday-vietnam-address/
- Bugs and questions: https://github.com/opens-freeday/freeday-vietnam-address/issues
- Email: opens@freedayos.com
-
What happens when I delete the plugin?
-
Its settings (option
vafw_settings) are removed. Addresses and ward codes already saved on orders and customers stay.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Freeday Vietnam Address” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Freeday Vietnam Address” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- First release (continues “Vietnam Address Units” 1.0.0). Data valid as of 29/11/2026: 34 provinces / cities (9 centrally-run cities), 3,321 commune-level units (709 wards, 2,599 communes, 13 special zones).
- New: read-only REST API; takes over vn-address settings; stays inactive with a notice while vn-address is active.
- Public API for other plugins: ward by code (PHP + REST), picker for any form, ward code on customers, hooks to extend or take over the WooCommerce fields.
