mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Disabled GooglePay and ApplePay on locations with subsciption products.
This commit is contained in:
parent
ac7779bc41
commit
24f98cd038
10 changed files with 65 additions and 1 deletions
|
@ -42,6 +42,10 @@ class ApplepayButton {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.contextHandler.validateContext()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.log('Init', this.context);
|
||||
this.initEventHandlers();
|
||||
this.isInitialized = true;
|
||||
|
@ -263,7 +267,7 @@ class ApplepayButton {
|
|||
switch (this.context) {
|
||||
case 'product':
|
||||
// Refresh product data that makes the price change.
|
||||
this.productQuantity = document.querySelector('input.qty').value;
|
||||
this.productQuantity = document.querySelector('input.qty')?.value;
|
||||
this.products = this.contextHandler.products();
|
||||
this.log('Products updated', this.products);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue