mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Use appendChild for better compatibility
For some reason Babel does not polyfill it
This commit is contained in:
parent
53d4648b4f
commit
5be88678e7
3 changed files with 3 additions and 3 deletions
|
@ -240,6 +240,6 @@ document.addEventListener(
|
|||
return;
|
||||
}
|
||||
|
||||
document.body.append(script);
|
||||
document.body.appendChild(script);
|
||||
},
|
||||
);
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue