{"id":419008,"date":"2026-12-02T09:13:51","date_gmt":"2026-12-02T09:13:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/freeday-vietnam-address\/"},"modified":"2026-12-02T15:04:38","modified_gmt":"2026-12-02T15:04:38","slug":"freeday-vietnam-address","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/freeday-vietnam-address\/","author":23617048,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.1.5","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"Freeday Vietnam Address","header_author":"Freeday Technology Teams","header_description":"Vietnam's official 34 provinces and 3,321 wards \/ communes for WooCommerce addresses: searchable ward picker, validation and a REST API.","last_updated":"2026-12-02 15:04:38","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/opens.freedayos.com\/freeday-vietnam-address\/","header_author_uri":"https:\/\/opens.freedayos.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":55,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"opensfreeday","date":"2026-12-02 15:04:38","revision":3840352}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3839516,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3839516,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3839516,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3840352,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3840352,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3840352,"resolution":"1","location":"assets","locale":"","width":812,"height":370},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3840352,"resolution":"2","location":"assets","locale":"","width":693,"height":327},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3840352,"resolution":"3","location":"assets","locale":"","width":1040,"height":103}},"screenshots":{"1":"Checkout: after choosing the province, typing a few letters (no accents needed) lists the official wards of that province.","2":"The same picker on a plain form from another plugin, filling in the official 5-digit ward code.","3":"A ward that does not belong to the chosen province is refused on the server, with a clear message."}},"plugin_section":[],"plugin_tags":[3513,3148,39081,266033,286],"plugin_category":[45,49],"plugin_contributors":[297103],"plugin_business_model":[],"class_list":["post-419008","plugin","type-plugin","status-publish","hentry","plugin_tags-address","plugin_tags-checkout","plugin_tags-vietnam","plugin_tags-ward","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_category-maps-and-location","plugin_contributors-opensfreeday","plugin_committers-opensfreeday"],"banners":{"banner":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/banner-772x250.png?rev=3840352","banner_2x":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/banner-1544x500.png?rev=3840352","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/icon.svg?rev=3839516","icon":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/icon.svg?rev=3839516","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/screenshot-1.png?rev=3840352","caption":"Checkout: after choosing the province, typing a few letters (no accents needed) lists the official wards of that province."},{"src":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/screenshot-2.png?rev=3840352","caption":"The same picker on a plain form from another plugin, filling in the official 5-digit ward code."},{"src":"https:\/\/ps.w.org\/freeday-vietnam-address\/assets\/screenshot-3.png?rev=3840352","caption":"A ward that does not belong to the chosen province is refused on the server, with a clear message."}],"raw_content":"<!--section=description-->\n<p>Since 1 July 2025 Vietnam has 34 provinces \/ cities and no district level. Freeday Vietnam Address brings that official list to your site:<\/p>\n\n<ul>\n<li><strong>Province field<\/strong> for Vietnam (WooCommerce \"state\") with stable keys (HCM, HN\u2026) that never change, so shipping zones keep working.<\/li>\n<li><strong>Ward \/ commune picker<\/strong>: the \"city\" field opens a searchable list of the chosen province \u2014 typing without accents works (\"ben thanh\" \u2192 Ph\u01b0\u1eddng B\u1ebfn Th\u00e0nh), keyboard friendly. Block checkout, cart, classic checkout and My Account.<\/li>\n<li><strong>Server-side check<\/strong>: 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.<\/li>\n<li><strong>Any form<\/strong>: the same picker works on forms of other plugins and themes (see Developers).<\/li>\n<li><strong>Field order<\/strong> country \u2192 province \u2192 ward \u2192 street; postcode hidden (both optional).<\/li>\n<li><strong>REST API<\/strong> (read-only, public): provinces, wards with search, lookup \u2014 for any form, theme or app.<\/li>\n<li>No external requests: the data ships with the plugin.<\/li>\n<li>English interface with a bundled Vietnamese translation.<\/li>\n<\/ul>\n\n<h4>Data source and licence<\/h4>\n\n<p>The list comes from the Registry of administrative units of the General Statistics Office (C\u1ee5c Th\u1ed1ng k\u00ea, B\u1ed9 T\u00e0i ch\u00ednh): https:\/\/danhmuchanhchinh.nso.gov.vn\/. Codes follow Decision 19\/2025\/Q\u0110-TTg and later resolutions. Settings \u2192 Vietnam Address shows the date the data is valid for.<\/p>\n\n<p>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.<\/p>\n\n<h4>External services<\/h4>\n\n<p>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.<\/p>\n\n<h4>Privacy<\/h4>\n\n<p>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 <code>_vafw_billing_ward<\/code>, <code>_vafw_shipping_ward<\/code>) next to the address WooCommerce already stores.<\/p>\n\n<h4>Developers<\/h4>\n\n<p>Other plugins and themes can build on the data instead of shipping their own copy. Everything below is a stable public API (<code>VAFW_API_VERSION<\/code>, currently 1); check for it with <code>defined( 'VAFW_API_VERSION' )<\/code> or the <code>vafw_loaded<\/code> action.<\/p>\n\n<ul>\n<li>Full reference: https:\/\/opens.freedayos.com\/docs\/freeday-vietnam-address\/<\/li>\n<li><p>Source code, the data build script and issues: https:\/\/github.com\/opens-freeday\/freeday-vietnam-address<\/p><\/li>\n<li><p>PHP: <code>vafw_provinces()<\/code>, <code>vafw_get_province( $key_or_code )<\/code>, <code>vafw_wards( $province )<\/code>, <code>vafw_get_ward( $code )<\/code>, <code>vafw_find_ward( $province, $text )<\/code>, <code>vafw_enqueue_picker()<\/code>.<\/p><\/li>\n<li>REST (<code>\/wp-json\/freeday-vietnam-address\/v1<\/code>): <code>GET \/provinces<\/code>, <code>\/provinces\/{key|code}\/wards?search=<\/code>, <code>\/lookup?province=&amp;ward=<\/code>, <code>\/wards\/{code}<\/code>, <code>\/meta<\/code>.<\/li>\n<li>Picker on any form: call <code>vafw_enqueue_picker()<\/code>, then <code>&lt;input data-vafw-ward data-vafw-province=\"#province\" data-vafw-code=\"#ward-code\"&gt;<\/code>; or <code>window.vafw.attach( input, { province, country, code } )<\/code>. Also <code>window.vafw.wards( province )<\/code> and <code>window.vafw.find( province, text )<\/code>.<\/li>\n<li>Actions: <code>vafw_loaded<\/code>.<\/li>\n<li>Filters: <code>vafw_settings<\/code>, <code>vafw_woocommerce_enabled<\/code> (return false to handle the WooCommerce address fields yourself), <code>vafw_find_ward<\/code>, <code>vafw_address_format<\/code>, <code>vafw_load_picker<\/code>, <code>vafw_rest_enabled<\/code>, <code>vafw_data_dir<\/code>, <code>vafw_data_url<\/code>.<\/li>\n<li>Meta (orders and customers): <code>_vafw_billing_ward<\/code>, <code>_vafw_shipping_ward<\/code> (5-digit official code). Province = WooCommerce state key (HCM, HN\u2026), ward name = city field.<\/li>\n<\/ul>\n\n<h4>Coming from \"Vietnam Address Units\" (vn-address)?<\/h4>\n\n<p>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).<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>freeday-vietnam-address<\/code> folder to <code>\/wp-content\/plugins\/<\/code> (or Plugins \u2192 Add New \u2192 Upload).<\/li>\n<li>Activate it. With WooCommerce, Vietnam addresses use the new fields right away.<\/li>\n<li>Optional: Settings \u2192 Vietnam Address.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"do%20i%20need%20woocommerce%3F\"><h3>Do I need WooCommerce?<\/h3><\/dt>\n<dd><p>No. Without WooCommerce the data is available through the PHP functions and the REST API.<\/p><\/dd>\n<dt id=\"how%20is%20the%20data%20updated%3F\"><h3>How is the data updated?<\/h3><\/dt>\n<dd><p>When the State changes administrative units, a new plugin version ships updated data. Province keys never change.<\/p><\/dd>\n<dt id=\"is%20the%20rest%20api%20public%3F\"><h3>Is the REST API public?<\/h3><\/dt>\n<dd><p>Yes, on purpose: it only returns the public list of administrative units and never writes anything. Turn it off in Settings \u2192 Vietnam Address or with the <code>vafw_rest_enabled<\/code> filter.<\/p><\/dd>\n<dt id=\"where%20can%20i%20get%20help%3F\"><h3>Where can I get help?<\/h3><\/dt>\n<dd><ul>\n<li>Documentation: https:\/\/opens.freedayos.com\/docs\/freeday-vietnam-address\/<\/li>\n<li>Bugs and questions: https:\/\/github.com\/opens-freeday\/freeday-vietnam-address\/issues<\/li>\n<li>Email: opens@freedayos.com<\/li>\n<\/ul><\/dd>\n<dt id=\"what%20happens%20when%20i%20delete%20the%20plugin%3F\"><h3>What happens when I delete the plugin?<\/h3><\/dt>\n<dd><p>Its settings (option <code>vafw_settings<\/code>) are removed. Addresses and ward codes already saved on orders and customers stay.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>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).<\/li>\n<li>New: read-only REST API; takes over vn-address settings; stays inactive with a notice while vn-address is active.<\/li>\n<li>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.<\/li>\n<\/ul>","raw_excerpt":"Vietnam's official 34 provinces \/ cities and 3,321 wards \/ communes for WordPress and WooCommerce addresses.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/419008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=419008"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/opensfreeday"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=419008"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=419008"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=419008"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=419008"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=419008"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=419008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}