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: https://gist.github.com/jan-koch/544f858ae37e63ddf161243062f308fe
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: https://www.facebook.com/groups/wpmastery.group/
– Subscribe to my email list: https://wpmastery.xyz
– Tweet me @iamjankoch