mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +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',
|
'commit' => in_array( $context, $this->pay_now_contexts, true ) ? 'true' : 'false',
|
||||||
'intent' => $intent,
|
'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 (
|
if (
|
||||||
$this->environment->current_environment_is( Environment::SANDBOX )
|
$this->environment->current_environment_is( Environment::SANDBOX )
|
||||||
&& defined( 'WP_DEBUG' ) && \WP_DEBUG
|
&& defined( 'WP_DEBUG' ) && \WP_DEBUG
|
||||||
|
|
|
@ -329,6 +329,13 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
||||||
$endpoint->handle_request();
|
$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