Merge pull request #1789 from woocommerce/PCP-2136-apple-pay-payment-process-issues

Apple Pay payment process issues (2136)
This commit is contained in:
Emili Castells 2023-10-23 16:52:54 +02:00 committed by GitHub
commit df283218bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 91 additions and 45 deletions

View file

@ -8,11 +8,19 @@ import ApplepayManager from "./ApplepayManager";
jQuery
}) {
let manager;
const bootstrap = function () {
const manager = new ApplepayManager(buttonConfig, ppcpConfig);
manager = new ApplepayManager(buttonConfig, ppcpConfig);
manager.init();
};
jQuery(document.body).on('updated_cart_totals updated_checkout', () => {
if (manager) {
manager.reinit();
}
});
document.addEventListener(
'DOMContentLoaded',
() => {