always load js logic and styles as an item might newly be added to the cart

This commit is contained in:
David Remer 2020-07-20 11:49:59 +03:00
parent e2dfaf7f99
commit 9d974be95d
2 changed files with 1 additions and 9 deletions

View file

@ -53,13 +53,6 @@ document.addEventListener(
console.error('PayPal button could not be configured.');
return;
}
if (
! document.querySelector(PayPalCommerceGateway.button.wrapper) &&
! document.querySelector(PayPalCommerceGateway.button.mini_cart_wrapper) &&
! document.querySelector(PayPalCommerceGateway.hosted_fields.wrapper)
) {
return;
}
const script = document.createElement('script');
script.setAttribute('src', PayPalCommerceGateway.button.url);