Add onboarding support for new countries in WCPay (#36906)

* Add new countries to WCPay

* changelog

* add new countries code to woocommerce admin

* Add the new countries to onboarding wizard fallback config file

---------

Co-authored-by: Anurag Bhandari <anurag@automattic.com>
This commit is contained in:
Ahmed 2023-03-16 20:48:45 +08:00 committed by GitHub
parent b19ad2f6d7
commit 3985242547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 77 additions and 1 deletions

View File

@ -73,6 +73,18 @@ export function isWCPaySupported( countryCode ) {
'CH',
'HK',
'SG',
'CY',
'DK',
'EE',
'FI',
'GR',
'LU',
'LT',
'LV',
'NO',
'MT',
'SI',
'SK',
];
return supportedCountries.includes( countryCode );

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add support for new countries in WCPay

View File

@ -433,7 +433,7 @@ class DefaultPaymentGateways {
* @return array Array of countries.
*/
public static function get_wcpay_countries() {
return array( 'US', 'PR', 'AU', 'CA', 'DE', 'ES', 'FR', 'GB', 'IE', 'IT', 'NZ', 'AT', 'BE', 'NL', 'PL', 'PT', 'CH', 'HK', 'SG' );
return array( 'US', 'PR', 'AU', 'CA', 'CY', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'IE', 'IT', 'LU', 'LT', 'LV', 'NO', 'NZ', 'MT', 'AT', 'BE', 'NL', 'PL', 'PT', 'CH', 'HK', 'SI', 'SK', 'SG' );
}
/**

View File

@ -284,6 +284,66 @@ class DefaultFreeExtensions {
'value' => 'SG',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'CY',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'DK',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'EE',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'FI',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'GR',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'LU',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'LT',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'LV',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'NO',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'MT',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'SI',
'operation' => '=',
],
[
'type' => 'base_location_country',
'value' => 'SK',
'operation' => '=',
],
],
],
DefaultPaymentGateways::get_rules_for_cbd( false ),