Make the "state" checkout field optional for BG and HU (#36701)

* Make state optional for BG and HU.

* Add changelog.

* PHPCS spacing fix

* Hide State field for Hungary.

* Unhide the State in Hungary.

Some extensions might still use it e.g. for shipping purposes.

* Merge branch 'trunk' into fix/hu-and-bg-state-optional
This commit is contained in:
Peter Fabian 2023-02-14 00:45:54 +01:00 committed by GitHub
parent 2da44aea66
commit 906c84b85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Make states optional for Hungary and Bulgaria.

View File

@ -882,6 +882,11 @@ class WC_Countries {
'hidden' => true,
),
),
'BG' => array(
'state' => array(
'required' => false,
),
),
'BH' => array(
'postcode' => array(
'required' => false,
@ -1115,7 +1120,8 @@ class WC_Countries {
'priority' => 72,
),
'state' => array(
'label' => __( 'County', 'woocommerce' ),
'label' => __( 'County', 'woocommerce' ),
'required' => false,
),
),
'ID' => array(