WooCommerce enqueues 3 stylesheets by default. You can disable them all with the following snippet:
add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
Add this code to your child theme’s functions.php
file.
This way deleted all WooCommerce default styles and is the recommended process if you’re building a custom theme.
Disable specific stylesheets
If you want to disable specific stylesheets (i.e, if you do not want to include the handheld stylesheet), you can use the following:
unset( $enqueue_styles['css file name'] );
You can disable the next CSS styles:
woocommerce-general
– the glosswoocommerce-layout
– the layoutwoocommerce-smallscreen
– the smallscreen optimisation
Example:
// Remove each style one by one
add_filter( 'woocommerce_enqueue_styles', 'skyal_dequeue_styles' );
function skyal_dequeue_styles( $enqueue_styles ) {
unset( $enqueue_styles['woocommerce-general'] ); // Remove the gloss
return $enqueue_styles;
}
I hope this article was helpful to you.