Ah, so button.js loads the other two.
Still, why is this being loaded outside of single product pages and the cart/checkout?
I agree, as good practice they should load the JS conditionally.
Hi there,
The scripts are only loaded when a button is active on that page.
So when you have the button for the Mini Cart enabled, then the scripts will be loaded on all non-Cart and non-Checkout pages of your site.
Disabling it will prevent the scripts from being loaded: https://woocommerce.com/document/woocommerce-paypal-payments/#button-on-mini-cart
Kind regards,
Niklas
@niklasinpsyde
Unfortunately we are seeing PayPal’s scripts being loaded on the frontend despite not having Mini Cart or others activated…
The file /woocommerce-paypal-payments/modules/ppcp-wc-gateway/assets/js/pay-upon-invoice.js
is being loaded and in turn other scripts / calls are being initiated such as https://c.paypal.com/da/r/fb.js
.
We have the sandbox mode enabled and the only setting we activated is Enable on Checkout, all other options are NOT active.
Using the latest version 1.9.0.
Please look into this asap and let us know if you need anything else in this regards – we can provide a full log as well as backend access if need be.
Thanks & regards,
Henning