mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Add support for Venmo button with vault v3
This commit is contained in:
parent
af577c130f
commit
751edc8353
2 changed files with 17 additions and 0 deletions
|
@ -1253,6 +1253,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
|
||||
|
|
|
@ -329,6 +329,13 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
$endpoint->handle_request();
|
||||
}
|
||||
);
|
||||
|
||||
add_filter(
|
||||
'woocommerce_paypal_payments_save_payment_methods_eligible',
|
||||
function() {
|
||||
return true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue