mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'trunk' into PCP-2006-google-pay-settings-improvements
This commit is contained in:
commit
a4ddb81d54
18 changed files with 298 additions and 116 deletions
|
@ -17,7 +17,7 @@ class SingleProductBootstap {
|
|||
this.formSelector = 'form.cart';
|
||||
|
||||
// Prevent simulate cart being called too many times in a burst.
|
||||
this.simulateCartThrottled = throttle(this.simulateCart, 5000);
|
||||
this.simulateCartThrottled = throttle(this.simulateCart, this.gateway.simulate_cart.throttling || 5000);
|
||||
|
||||
this.renderer.onButtonsInit(this.gateway.button.wrapper, () => {
|
||||
this.handleChange();
|
||||
|
@ -217,6 +217,10 @@ class SingleProductBootstap {
|
|||
}
|
||||
|
||||
simulateCart() {
|
||||
if (!this.gateway.simulate_cart.enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const actionHandler = new SingleProductActionHandler(
|
||||
null,
|
||||
null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue