diff --git a/modules/ppcp-button/resources/js/button.js b/modules/ppcp-button/resources/js/button.js index 23a9d71b9..9d9d792ae 100644 --- a/modules/ppcp-button/resources/js/button.js +++ b/modules/ppcp-button/resources/js/button.js @@ -240,6 +240,6 @@ document.addEventListener( return; } - document.body.append(script); + document.body.appendChild(script); }, ); diff --git a/modules/ppcp-button/resources/js/modules/DataClientIdAttributeHandler.js b/modules/ppcp-button/resources/js/modules/DataClientIdAttributeHandler.js index 9888bc0b8..67fc8cc45 100644 --- a/modules/ppcp-button/resources/js/modules/DataClientIdAttributeHandler.js +++ b/modules/ppcp-button/resources/js/modules/DataClientIdAttributeHandler.js @@ -39,7 +39,7 @@ const dataClientIdAttributeHandler = (script, config) => { } storeToken(data); script.setAttribute('data-client-token', data.token); - document.body.append(script); + document.body.appendChild(script); }); } diff --git a/modules/ppcp-onboarding/assets/js/onboarding.js b/modules/ppcp-onboarding/assets/js/onboarding.js index 23dc00c42..1c7dd9cd0 100644 --- a/modules/ppcp-onboarding/assets/js/onboarding.js +++ b/modules/ppcp-onboarding/assets/js/onboarding.js @@ -54,7 +54,7 @@ const ppcp_onboarding = { const paypalScriptTag = document.createElement('script'); paypalScriptTag.id = ppcp_onboarding.PAYPAL_JS_ID; paypalScriptTag.src = PayPalCommerceGatewayOnboarding.paypal_js_url; - document.body.append(paypalScriptTag); + document.body.appendChild(paypalScriptTag); if (ppcp_onboarding._timeout) { clearTimeout(ppcp_onboarding._timeout);