Use default state ordering in the Checkout block instead of sorting alphabetically (#46656)

* Remove deep sort of states

* Add changelog
This commit is contained in:
Thomas Roberts 2024-05-20 18:17:36 +01:00 committed by GitHub
parent d7ca80d6c8
commit e87eb4e3ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Use the default ordering of states in the Checkout block

View File

@ -62,7 +62,7 @@ class CartCheckoutUtils {
$country_data[ $country_code ] = [
'allowBilling' => isset( $billing_countries[ $country_code ] ),
'allowShipping' => isset( $shipping_countries[ $country_code ] ),
'states' => self::deep_sort_with_accents( $country_states[ $country_code ] ?? [] ),
'states' => $country_states[ $country_code ] ?? [],
'locale' => $country_locales[ $country_code ] ?? [],
];
}