Add GB and CA to GooglePay allowed countries.

This commit is contained in:
Pedro Silva 2023-09-13 10:15:32 +01:00
parent c3e5d21e75
commit 2076fd3048
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 42 additions and 0 deletions

View file

@ -17,6 +17,12 @@ use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
return array(
'wcgateway.settings.fields' => function ( ContainerInterface $container, array $fields ): array {
// Eligibility check.
if ( ! $container->has( 'googlepay.eligible' ) || ! $container->get( 'googlepay.eligible' ) ) {
return $fields;
}
$insert_after = function( array $array, string $key, array $new ): array {
$keys = array_keys( $array );
$index = array_search( $key, $keys, true );

View file

@ -66,6 +66,24 @@ return array(
return apply_filters(
'woocommerce_paypal_payments_googlepay_supported_country_currency_matrix',
array(
'GB' => array(
'AUD',
'CAD',
'CHF',
'CZK',
'DKK',
'EUR',
'GBP',
'HKD',
'HUF',
'JPY',
'NOK',
'NZD',
'PLN',
'SEK',
'SGD',
'USD',
),
'US' => array(
'AUD',
'CAD',
@ -74,6 +92,24 @@ return array(
'JPY',
'USD',
),
'CA' => array(
'AUD',
'CAD',
'CHF',
'CZK',
'DKK',
'EUR',
'GBP',
'HKD',
'HUF',
'JPY',
'NOK',
'NZD',
'PLN',
'SEK',
'SGD',
'USD',
),
)
);
},