Merge branch 'trunk' into PCP-2006-google-pay-settings-improvements

This commit is contained in:
Pedro Silva 2023-10-13 15:32:49 +01:00 committed by GitHub
commit a4ddb81d54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 298 additions and 116 deletions

View file

@ -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,