Merge pull request #1669 from woocommerce/PCP-1960-acdc-vaulting-without-paypal

Do not declare subscription support for PayPal when only ACDC vaulting
This commit is contained in:
Emili Castells 2023-09-08 15:38:37 +02:00 committed by GitHub
commit 9372fe247d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,6 @@ class PayPalGateway extends \WC_Payment_Gateway {
if (
( $this->config->has( 'vault_enabled' ) && $this->config->get( 'vault_enabled' ) )
|| ( $this->config->has( 'vault_enabled_dcc' ) && $this->config->get( 'vault_enabled_dcc' ) )
|| ( $this->config->has( 'subscriptions_mode' ) && $this->config->get( 'subscriptions_mode' ) === 'subscriptions_api' )
) {
array_push(
@ -244,6 +243,8 @@ class PayPalGateway extends \WC_Payment_Gateway {
'subscription_payment_method_change_admin',
'multiple_subscriptions'
);
} elseif ( $this->config->has( 'vault_enabled_dcc' ) && $this->config->get( 'vault_enabled_dcc' ) ) {
$this->supports[] = 'tokenization';
}
}