Title: Javascript Loading on Every Page
Last modified: July 17, 2023

---

# Javascript Loading on Every Page

 *  Resolved [captaincrank](https://wordpress.org/support/users/captaincrank/)
 * (@captaincrank)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-loading-on-every-page/)
 * In smart button locations settings, we **only** have “checkout” selected yet 
   the javascript is being loaded on every page throughout our website. How do we
   deque javascript so it only loads on checkout page where the paypal buttons are
   located?
 * [https://i.postimg.cc/W4xqxv1N/paypal-settings.gif](https://i.postimg.cc/W4xqxv1N/paypal-settings.gif)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * (@joostvandevijver)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-loading-on-every-page/#post-16902550)
 * Hello [@captaincrank](https://wordpress.org/support/users/captaincrank/)
 * It appears the Mini Cart button is enabled on your site, despite no Mini Cart
   being provided by your theme.
   When this button location is enabled, the PayPal
   scripts will load essentially on all pages of your site: [https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-scripts-on-every-page](https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-scripts-on-every-page)
 * So if you want the scripts to only load on the Cart and & Checkout pages, then
   I suggest only enabling these button locations in the Standard Payments tab. 
   However, I do see that you have done this in the settings; maybe you want to 
   enable > save > disable > save the setting, to make sure it is correctly stored.
 * It could also be that the JavaScript you are seeing is not related to the mini-
   cart button. There is another feature that could be running that is related to
   the subscription migration. Here you find some details on this and how to disable
   this migration layer: [https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#disable-paypal-checkout-gateway-migration-layer-ppec-helper](https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#disable-paypal-checkout-gateway-migration-layer-ppec-helper)
 * Please see if any of these options help you resolve the issue or if you need 
   additional support.
 * Kind regards,
   Joost
 *  Thread Starter [captaincrank](https://wordpress.org/support/users/captaincrank/)
 * (@captaincrank)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-loading-on-every-page/#post-16903666)
 * Thank you for your response. Based on the information you provided, I will perform
   more research on our side. Have a good day.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Javascript Loading on Every Page’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [captaincrank](https://wordpress.org/support/users/captaincrank/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/javascript-loading-on-every-page/#post-16903666)
 * Status: resolved