render if updated_checkout event was missed

This commit is contained in:
Kirill Braslavsky 2021-02-25 18:41:45 +02:00
parent f121605e41
commit e3577bdff9
2 changed files with 8 additions and 0 deletions

View file

@ -79,6 +79,11 @@ document.addEventListener(
}
const script = document.createElement('script');
PayPalCommerceGateway.checkoutUpdatedFlag = false;
jQuery(document.body).on('updated_checkout', () => {
PayPalCommerceGateway.checkoutUpdatedFlag = true;
});
script.addEventListener('load', (event) => {
bootstrap();
});

View file

@ -11,6 +11,9 @@ class CheckoutBootstap {
init() {
if(PayPalCommerceGateway.checkoutUpdatedFlag){
this.render();
}
jQuery(document.body).on('updated_checkout', () => {
this.render();
});