diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 1b11c5970..7f07c332a 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -988,12 +988,13 @@ class SmartButton implements SmartButtonInterface { $intent = 'capture'; } - $params = array( + $subscription_mode = $this->settings->has( 'subscriptions_mode' ) ? $this->settings->get( 'subscriptions_mode' ) : ''; + $params = array( 'client-id' => $this->client_id, 'currency' => $this->currency, 'integration-date' => PAYPAL_INTEGRATION_DATE, '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', 'intent' => $intent, );