Skip to content

v0.3.12

Choose a tag to compare

@github-actions github-actions released this 10 May 22:34
· 8 commits to main since this release
  • Area position survives WC's client-side resort. The previous releases had Area at the correct DOM position (right after Country) — but assets/js/frontend/address-i18n.js (shipped by WooCommerce itself) re-sorts checkout fields by data-priority on every country_to_state_changing event, reading the priorities from wc_address_i18n_params.locale.default. Those localised priorities still carried WC's untouched default city: 70, so on every country pick WC's own JS re-tagged Area with priority 70 and moved it to between Address-line-2 (60) and State (80). That's what the merchant kept screenshotting.

    Fix: also set the unprefixed default.city.priority and default.state.priority in the woocommerce_default_address_fields filter, AND add a priority key to the GE-specific override in woocommerce_get_country_locale. Both filters feed wc_address_i18n_params directly, so the JS now reads Area at priority country_priority + 1 and the resort puts it back where the PHP rendered it. Reads country's actual priority at filter time so it works under any theme (Woodmart, default, custom) that may have re-mapped country.

  • Plugin survey: also reviewed every other active hook on woocommerce_checkout_fields / woocommerce_default_address_fields / woocommerce_get_country_locale on the live install. The Personal-ID field plugins (balance-sync, fina-sync) add fields without specifying a priority for the filter callback — they don't re-order, no conflict with Area positioning. Woodmart's checkout-fields-manager hooks at priority 99999 but its frontend JS only modifies the "required" badge, not the DOM order.