mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #1915 from woocommerce/PCP-2472-google-pay-and-apple-pay-buttons-disappear-when-adding-a-product-to-the-cart-on-the-shop-page
GooglePay and ApplePay buttons disappear from the minicart when adding a product to the cart on the shop page (PCP-2472)
This commit is contained in:
commit
e465bfb900
2 changed files with 18 additions and 0 deletions
|
@ -21,6 +21,15 @@ import ApplepayManager from "./ApplepayManager";
|
|||
}
|
||||
});
|
||||
|
||||
// Use set timeout as it's unnecessary to refresh upon Minicart initial render.
|
||||
setTimeout(() => {
|
||||
jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {
|
||||
if (manager) {
|
||||
manager.reinit();
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
|
|
|
@ -21,6 +21,15 @@ import GooglepayManager from "./GooglepayManager";
|
|||
}
|
||||
});
|
||||
|
||||
// Use set timeout as it's unnecessary to refresh upon Minicart initial render.
|
||||
setTimeout(() => {
|
||||
jQuery(document.body).on('wc_fragments_loaded wc_fragments_refreshed', () => {
|
||||
if (manager) {
|
||||
manager.reinit();
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue