mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Do not add payment token if subscription use PayPal Subscriptions API
This commit is contained in:
parent
4f334f5f60
commit
4d0a4676ec
1 changed files with 5 additions and 0 deletions
|
@ -74,6 +74,11 @@ class SubscriptionModule implements ModuleInterface {
|
||||||
add_action(
|
add_action(
|
||||||
'woocommerce_subscription_payment_complete',
|
'woocommerce_subscription_payment_complete',
|
||||||
function ( $subscription ) use ( $c ) {
|
function ( $subscription ) use ( $c ) {
|
||||||
|
$paypal_subscription_id = $subscription->get_meta( 'ppcp_subscription' ) ?? '';
|
||||||
|
if ( $paypal_subscription_id ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$payment_token_repository = $c->get( 'vaulting.repository.payment-token' );
|
$payment_token_repository = $c->get( 'vaulting.repository.payment-token' );
|
||||||
$logger = $c->get( 'woocommerce.logger.woocommerce' );
|
$logger = $c->get( 'woocommerce.logger.woocommerce' );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue