mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
render if updated_checkout event was missed
This commit is contained in:
parent
f121605e41
commit
e3577bdff9
2 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -11,6 +11,9 @@ class CheckoutBootstap {
|
|||
|
||||
init() {
|
||||
|
||||
if(PayPalCommerceGateway.checkoutUpdatedFlag){
|
||||
this.render();
|
||||
}
|
||||
jQuery(document.body).on('updated_checkout', () => {
|
||||
this.render();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue