mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Fix PayPal button display on blocks conditions
This commit is contained in:
parent
1fe9b9f1a6
commit
408503af1a
2 changed files with 6 additions and 2 deletions
|
@ -466,9 +466,10 @@ const features = ['products'];
|
|||
let block_enabled = true;
|
||||
|
||||
if(cartHasSubscriptionProducts(config.scriptData)) {
|
||||
// Don't show buttons on block cart page if using vault v2
|
||||
// Don't show buttons on block cart page if using vault v2 and user is not logged in
|
||||
if (
|
||||
config.scriptData.context === "cart-block"
|
||||
! config.scriptData.user.is_logged
|
||||
&& config.scriptData.context === "cart-block"
|
||||
&& ! isPayPalSubscription(config.scriptData) // using vaulting
|
||||
&& ! config.scriptData?.save_payment_methods?.id_token // not vault v3
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue