Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Last active July 7, 2017 23:43
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jameskoster/6139213 to your computer and use it in GitHub Desktop.
Save jameskoster/6139213 to your computer and use it in GitHub Desktop.
WooCommerce - dequeue css (2.1+)
// Remove each style one by one
add_filter( 'woocommerce_enqueue_styles', 'jk_dequeue_styles' );
function jk_dequeue_styles( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss
unset( $enqueue_styles['woocommerce-layout'] ); // Remove the layout
unset( $enqueue_styles['woocommerce-smallscreen'] ); // Remove the smallscreen optimisation
return $enqueue_styles;
}
// Or just remove them all in one line
add_filter( 'woocommerce_enqueue_styles', '__return_false' );
@mjn666
Copy link

mjn666 commented Mar 7, 2014

Cheers :)

@richardsweeney
Copy link

Many thanks!

@eliasfaical
Copy link

Good

@bynicolas
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment