Remove WooCommerce Styles and Scripts

I’ve recently started working with WooCommerce for a client. IMHO, it’s absolutely the most brilliant and easy-to-use shopping cart for WordPress.

However, you know me and I hate plug-ins and bloat. Here’s how to disable all the extra style-sheets and scripts WooCommerce loads througout your web site, and restricts them to just loading in your store:

Add this to your theme’s functions.php

Another way, is to remove the functions all together (thanks to WPSMITH):


  1. It’s fantastic, thanks, speeds up home page no end and stopped the ridiculous ajax calls.

    One question, how would one go about adding this to other pages that dont require the woocommerce bloat code?

    Thanks again

  2. Mhh all codes from your site and in the comment doesn’t work. I’ve changed the ‘ with the correct ‘. Must I change something for my template? I use superstore from woocommerce. Thanks for help.

  3. Solosails, I prefer to use the following if statement instead:

    if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
  4. Been pulling my hair out trying to dequeue “wc-add-to-cart-variation” javascript. If anyone else is having this problem add the following to the function above: wp_deregister_script(‘wc-add-to-cart-variation’);

    Deregistering it will remove it completely.

Leave a Reply