mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Fix subscription validations
This commit is contained in:
parent
6c0e0a96dc
commit
ebcc2ba3f9
2 changed files with 16 additions and 2 deletions
|
@ -477,6 +477,14 @@ if(cartHasSubscriptionProducts(config.scriptData)) {
|
|||
block_enabled = false;
|
||||
}
|
||||
|
||||
// Don't render if vaulting disabled and is in vault subscription mode
|
||||
if(
|
||||
! isPayPalSubscription(config.scriptData)
|
||||
&& ! config.scriptData.can_save_vault_token
|
||||
) {
|
||||
block_enabled = false;
|
||||
}
|
||||
|
||||
// Don't render buttons if in subscription mode and product not associated with a PayPal subscription
|
||||
if(
|
||||
isPayPalSubscription(config.scriptData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue