Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Show comment
Hide comment
@mjn666

mjn666 Mar 7, 2014

Cheers :)

mjn666 commented Mar 7, 2014

Cheers :)

@richardsweeney

This comment has been minimized.

Show comment
Hide comment
@richardsweeney

richardsweeney commented Jun 30, 2014

Many thanks!

@eliasfaical

This comment has been minimized.

Show comment
Hide comment
@eliasfaical

eliasfaical commented Jul 16, 2014

Good

@bynicolas

This comment has been minimized.

Show comment
Hide comment
@bynicolas

bynicolas commented Mar 2, 2015

Thanks

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