Merge pull request #1958 from woocommerce/PCP-2522-venmo-vaulting-integration

Venmo Vaulting integration (2522)
This commit is contained in:
Emili Castells 2024-01-17 14:50:47 +01:00 committed by GitHub
commit 2bd7d2bf0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 64 additions and 8 deletions

View file

@ -1256,6 +1256,16 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
'commit' => in_array( $context, $this->pay_now_contexts, true ) ? 'true' : 'false',
'intent' => $intent,
);
if (
$this->settings->has( 'subscriptions_mode' )
&& $this->settings->get( 'subscriptions_mode' ) === 'vaulting_api'
&& apply_filters( 'woocommerce_paypal_payments_save_payment_methods_eligible', false )
) {
// Remove vault parameter to allow for Venmo with Save Payment Methods (Vault V3).
unset( $params['vault'] );
}
if (
$this->environment->current_environment_is( Environment::SANDBOX )
&& defined( 'WP_DEBUG' ) && \WP_DEBUG