mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
✨ Add UK and GBP to the Fastlane country/currency supported matrix (behind a feature flag)
This commit is contained in:
parent
bd230ec4df
commit
9d2cbdbe51
1 changed files with 63 additions and 24 deletions
|
@ -156,46 +156,85 @@ return array(
|
|||
* The matrix which countries and currency combinations can be used for AXO.
|
||||
*/
|
||||
'axo.supported-country-currency-matrix' => static function ( ContainerInterface $container ) : array {
|
||||
$matrix = array(
|
||||
'US' => array(
|
||||
'AUD',
|
||||
'CAD',
|
||||
'EUR',
|
||||
'GBP',
|
||||
'JPY',
|
||||
'USD',
|
||||
),
|
||||
);
|
||||
|
||||
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
/**
|
||||
* Filter to determine if Fastlane UK with 3D Secure should be enabled.
|
||||
*
|
||||
* @param bool $enabled Whether Fastlane UK is enabled.
|
||||
*/
|
||||
if ( apply_filters(
|
||||
'woocommerce.feature-flags.woocommerce_paypal_payments.axo_uk_enabled',
|
||||
getenv( 'PCP_AXO_UK_ENABLED' ) !== '0'
|
||||
) ) {
|
||||
$matrix['GB'] = array(
|
||||
'GBP',
|
||||
);
|
||||
}
|
||||
// phpcs:enable WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/**
|
||||
* Returns which countries and currency combinations can be used for AXO.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_axo_supported_country_currency_matrix',
|
||||
array(
|
||||
'US' => array(
|
||||
'AUD',
|
||||
'CAD',
|
||||
'EUR',
|
||||
'GBP',
|
||||
'JPY',
|
||||
'USD',
|
||||
),
|
||||
)
|
||||
$matrix
|
||||
);
|
||||
},
|
||||
/**
|
||||
* The matrix which countries and card type combinations can be used for AXO.
|
||||
*/
|
||||
'axo.supported-country-card-type-matrix' => static function ( ContainerInterface $container ) : array {
|
||||
$matrix = array(
|
||||
'US' => array(
|
||||
'VISA',
|
||||
'MASTERCARD',
|
||||
'AMEX',
|
||||
'DISCOVER',
|
||||
),
|
||||
'CA' => array(
|
||||
'VISA',
|
||||
'MASTERCARD',
|
||||
'AMEX',
|
||||
'DISCOVER',
|
||||
),
|
||||
);
|
||||
|
||||
// phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
/**
|
||||
* Filter to determine if Fastlane UK with 3D Secure should be enabled.
|
||||
*
|
||||
* @param bool $enabled Whether Fastlane UK is enabled.
|
||||
*/
|
||||
if ( apply_filters(
|
||||
'woocommerce.feature-flags.woocommerce_paypal_payments.axo_uk_enabled',
|
||||
getenv( 'PCP_AXO_UK_ENABLED' ) !== '0'
|
||||
) ) {
|
||||
$matrix['GB'] = array(
|
||||
'VISA',
|
||||
'MASTERCARD',
|
||||
'AMEX',
|
||||
'DISCOVER',
|
||||
);
|
||||
}
|
||||
// phpcs:enable WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/**
|
||||
* Returns which countries and card type combinations can be used for AXO.
|
||||
*/
|
||||
return apply_filters(
|
||||
'woocommerce_paypal_payments_axo_supported_country_card_type_matrix',
|
||||
array(
|
||||
'US' => array(
|
||||
'VISA',
|
||||
'MASTERCARD',
|
||||
'AMEX',
|
||||
'DISCOVER',
|
||||
),
|
||||
'CA' => array(
|
||||
'VISA',
|
||||
'MASTERCARD',
|
||||
'AMEX',
|
||||
'DISCOVER',
|
||||
),
|
||||
)
|
||||
$matrix
|
||||
);
|
||||
},
|
||||
'axo.settings-conflict-notice' => static function ( ContainerInterface $container ) : string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue