Make WooCommerce faster by removing unused CSS and JavaScript assets [code example]

This video shows you how to make WooCommerce websites faster by removing unused JS and CSS files that WooCommerce automatically loads.

I’ve prepared a code snippet you can simply copy and paste into your website that will remove those unused assets from any non-WooCommerce page on your site.

Here is the link to the Github gist:

This PHP function can be placed in your theme’s functions.php file.

By default, Woo loads CSS and JS files on every page or post on your website – even if it is not necessary. Using this function, you will make WooCommerce faster by only loading the WooCommerce assets when they are needed.

If you have any questions, please get in touch with me on one of these channels:
– Leave a comment here
– Join my FB group:
– Subscribe to my email list:
– Tweet me @iamjankoch

Post Author: hatefull