Title: JS files loading improvement
Last modified: January 31, 2023

---

# JS files loading improvement

 *  Resolved [tonuz](https://wordpress.org/support/users/tonuz/)
 * (@tonuz)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/js-files-loading-improvement/)
 * Hi Team,
 * Could we load **wc-ppcp-paylater-msg-checkout** script only if Pay Later messaging
   is enabled ?
 * Also, **wc-ppcp-cart** should be loaded on checkout page ? or only on cart page?
 * Regards,
 * Antoine

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

 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/js-files-loading-improvement/#post-16426504)
 * Hi [@tonuz](https://wordpress.org/support/users/tonuz/)
 * > Could we load **wc-ppcp-paylater-msg-checkout** script only if Pay Later messaging
   > is enabled ?
 * That file should only load if you have Pay Later messaging enabled. Are you seeing
   it load on your checkout page even if messaging is disabled?
 * The **`wc-ppcp-cart`** JS file is part of the checkout page code and logic and
   is therefore a required dependency. Don’t get caught up in the name of the file
   as describing the only function of that code.
 * Kind Regards
 *  Thread Starter [tonuz](https://wordpress.org/support/users/tonuz/)
 * (@tonuz)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/js-files-loading-improvement/#post-16433914)
 * Hi,
 * Thanks for the answer. However on my side the script is loaded even if messaging
   is disabled.
 * Also the plugin adds “wc-ppcp-paylater-msg-shop-container” <div> under every 
   products.
 * Is this possible to fix it ?
 * Regards,
 * Antoine
 *  Plugin Author [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * (@mrclayton)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/js-files-loading-improvement/#post-16434362)
 * Hi [@tonuz](https://wordpress.org/support/users/tonuz/)
 * We will take a look and see why the script would be enqueued even if messaging
   is disabled.
 * > Also the plugin adds “wc-ppcp-paylater-msg-shop-container” <div> under every
   > products.
   > Is this possible to fix it ?
 * Yes, in the next release we will ensure that html only renders if the shop messaging
   is enabled. Both fixes will be in tomorrow’s release. Thank you for bringing 
   that to our attention.
 * Kind Regards

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

The topic ‘JS files loading improvement’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [Clayton R](https://wordpress.org/support/users/mrclayton/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/js-files-loading-improvement/#post-16434362)
 * Status: resolved