mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Declare tokenization for ACDC only when vaulting enabled
This commit is contained in:
parent
f51dbfc6d3
commit
1f17989723
2 changed files with 2 additions and 3 deletions
|
@ -417,13 +417,14 @@ class SavePaymentMethodsModule implements ServiceModule, ExtendingModule, Execut
|
|||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_credit_card_gateway_vault_supports',
|
||||
'woocommerce_paypal_payments_credit_card_gateway_supports',
|
||||
function( array $supports ) use ( $c ): array {
|
||||
$settings = $c->get( 'wcgateway.settings' );
|
||||
assert( $settings instanceof ContainerInterface );
|
||||
|
||||
if ( $settings->has( 'vault_enabled_dcc' ) && $settings->get( 'vault_enabled_dcc' ) ) {
|
||||
$supports[] = 'tokenization';
|
||||
$supports[] = 'add_payment_method';
|
||||
}
|
||||
|
||||
return $supports;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue