Hello Nadir,
To exclude specific JavaScript files accurately in WP Optimize, you should use the full paths relative to your website’s root. Below are typical paths for the WooCommerce JavaScript files that you might need to exclude. These paths are based on a standard WooCommerce setup:
/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.js
/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.js
/wp-content/plugins/woocommerce/assets/js/frontend/checkout.js
/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.js
/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.js
Here’s how to exclude them:
- Go to WP-Optimize > Minify.
- In the Exclude JavaScript from processing section, add the full paths as listed above.
Also, remember to exclude your Cart and Checkout pages from caching:
- Go to WP-Optimize > Cache > Advanced settings.
- Add your Cart and Checkout pages in the “URLs to exclude from caching” field. Typically, these might be:
Please implement these settings, test your site thoroughly, and let us know if the issue is resolved or if further assistance is needed.
Best regards,
Mansour M
-
This reply was modified 6 months, 2 weeks ago by wpmansour.