Skip to content

Commit 6a4e36a

Browse files
authored
ECE: Empty state and optional postal code support for addresses in the Gulf countries (#4797)
* support optional state and postal code for Gulf countries in ECE * add changelog
1 parent dbb908b commit 6a4e36a

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Fix - Ensure Amazon Pay, Apple Pay, and Google Pay display settings are managed correctly
77
* Dev - Add logging with DNS resolution diagnostics for URL validation issues when calling Stripe API
88
* Fix - Allow payment methods to be disabled when they are not available
9+
* Fix - Ensure state and postal code are optional in express checkout for Gulf countries (UAE, Bahrain, Kuwait, Oman, Qatar)
910
* Dev - Removes the `_wcstripe_feature_upe` feature flag and the related method from the `WC_Stripe_Feature_Flags` class
1011
* Dev - Fixes some incorrect subscriptions support implementations for payment methods
1112

includes/constants/class-wc-stripe-payment-request-button-states.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class WC_Stripe_Payment_Request_Button_States {
4646
const STATES = [
4747
// Afghanistan.
4848
'AF' => [],
49+
// United Arab Emirates.
50+
'AE' => [],
4951
// Angola.
5052
'AO' => [],
5153
// Argentina.
@@ -776,6 +778,8 @@ class WC_Stripe_Payment_Request_Button_States {
776778
'NP' => [],
777779
// New Zealand.
778780
'NZ' => [],
781+
// Oman.
782+
'OM' => [],
779783
// Peru.
780784
'PE' => [
781785
'CAL' => [ 'Callao', 'Callao', NULL ],
@@ -900,6 +904,8 @@ class WC_Stripe_Payment_Request_Button_States {
900904
'PT' => [],
901905
// Paraguay.
902906
'PY' => [],
907+
// Qatar.
908+
'QA' => [],
903909
// Reunion.
904910
'RE' => [],
905911
// Romania.

includes/payment-methods/class-wc-stripe-express-checkout-ajax-handler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,12 @@ public function modify_country_locale_for_express_checkout( $locale ) {
427427
$countries_with_optional_postcode = apply_filters(
428428
'wc_stripe_express_checkout_countries_with_optional_postcode',
429429
[
430+
'AE', // United Arab Emirates
431+
'BH', // Bahrain
430432
'IL', // Israel
433+
'KW', // Kuwait
434+
'OM', // Oman
435+
'QA', // Qatar
431436
'SA', // Saudi Arabia
432437
]
433438
);

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
116116
* Fix - Ensure Amazon Pay, Apple Pay, and Google Pay display settings are managed correctly
117117
* Dev - Add logging with DNS resolution diagnostics for URL validation issues when calling Stripe API
118118
* Fix - Allow payment methods to be disabled when they are not available
119+
* Fix - Ensure state and postal code are optional in express checkout for Gulf countries (UAE, Bahrain, Kuwait, Oman, Qatar)
119120
* Dev - Removes the `_wcstripe_feature_upe` feature flag and the related method from the `WC_Stripe_Feature_Flags` class
120121
* Dev - Fixes some incorrect subscriptions support implementations for payment methods
121122

0 commit comments

Comments
 (0)