mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Add vault true when subscription in cart
This commit is contained in:
parent
e2d1f40de0
commit
e173f39e3c
1 changed files with 3 additions and 2 deletions
|
@ -988,12 +988,13 @@ class SmartButton implements SmartButtonInterface {
|
||||||
$intent = 'capture';
|
$intent = 'capture';
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = array(
|
$subscription_mode = $this->settings->has( 'subscriptions_mode' ) ? $this->settings->get( 'subscriptions_mode' ) : '';
|
||||||
|
$params = array(
|
||||||
'client-id' => $this->client_id,
|
'client-id' => $this->client_id,
|
||||||
'currency' => $this->currency,
|
'currency' => $this->currency,
|
||||||
'integration-date' => PAYPAL_INTEGRATION_DATE,
|
'integration-date' => PAYPAL_INTEGRATION_DATE,
|
||||||
'components' => implode( ',', $this->components() ),
|
'components' => implode( ',', $this->components() ),
|
||||||
'vault' => $this->can_save_vault_token() ? 'true' : 'false',
|
'vault' => ( $this->can_save_vault_token() || $this->subscription_helper->need_subscription_intent( $subscription_mode ) ) ? 'true' : 'false',
|
||||||
'commit' => in_array( $context, $this->pay_now_contexts, true ) ? 'true' : 'false',
|
'commit' => in_array( $context, $this->pay_now_contexts, true ) ? 'true' : 'false',
|
||||||
'intent' => $intent,
|
'intent' => $intent,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue