Closed jorgeatorres closed 3 years ago
Thanks for the fix @jorgeatorres !
When I brought this issue up in https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout/pull/810#issuecomment-701875357 (point 2 at the bottom) I was worried there wasn't a nice solution but I'm very glad to see it could be fixed in our code and not on PayPal's side 😄
I've tested all the above conditions and this looks good :100: Merging
Description
In #810 we forced
vault=true
in the SDK arguments when displaying PayPal buttons for subscription products or when there was a subscription in the cart. The latter condition isn't actually correct, as you might have a subscription product in the cart but if you visit a non-subscription product you should be able to pay using non-vaulted methods given that clicking a PayPal button to start the payment workflow ignores whatever items the cart contains.Steps to test:
trunk
.vault
parameter.vault='true'
argument.vault='true'
argument on cart and checkout pages.vault='true'
argument even when visiting a non-subscription product page.vaulting-fix
).vault
argument even if there's a subscription in the cart ✅.