Add throttling to simulate_cart ajax call
This commit is contained in:
Pedro Silva 2023-07-20 17:51:48 +01:00
parent a0480e35bb
commit 84a362a7c5
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
13 changed files with 203 additions and 114 deletions

View file

@ -13,13 +13,12 @@ import {
ORDER_BUTTON_SELECTOR,
PaymentMethods
} from "./modules/Helper/CheckoutMethodState";
import {hide, setVisible, setVisibleByClass} from "./modules/Helper/Hiding";
import {setVisibleByClass} from "./modules/Helper/Hiding";
import {isChangePaymentPage} from "./modules/Helper/Subscriptions";
import FreeTrialHandler from "./modules/ActionHandler/FreeTrialHandler";
import FormSaver from './modules/Helper/FormSaver';
import FormValidator from "./modules/Helper/FormValidator";
import {loadPaypalScript} from "./modules/Helper/ScriptLoading";
import widgetBuilder from "./modules/Renderer/WidgetBuilder";
// TODO: could be a good idea to have a separate spinner for each gateway,
// but I think we care mainly about the script loading, so one spinner should be enough.
@ -268,8 +267,6 @@ document.addEventListener(
});
loadPaypalScript(PayPalCommerceGateway, () => {
widgetBuilder.setPaypal(paypal);
bootstrapped = true;
bootstrap();