WooCommerce ships with a frontend stylesheet that provides baseline styling for all its templates, product grids, single product pages, cart, checkout, and account pages. For themes that include their own complete WooCommerce styling, this default stylesheet is redundant and creates a cascade of conflicting CSS rules that theme developers have to override. The result is extra HTTP requests, larger page payloads, and CSS specificity battles that make styling WooCommerce components more difficult than it should be.
This snippet disables all WooCommerce default styles in a single line, giving your theme’s stylesheet complete control over WooCommerce component appearance.
The Code
Add this to your functions.php or a site-specific plugin. The woocommerce_enqueue_styles filter normally returns an array of stylesheets to enqueue. Returning an empty array prevents any of them from loading.
When to Use This
This snippet is appropriate when your theme, whether a premium theme, a custom-built theme, or a page builder theme like Bricks or Elementor, provides styling for all WooCommerce templates. Most commercial themes designed with WooCommerce support do this. Check your theme documentation or ask the theme developer whether the theme is designed to run with or without WooCommerce’s default stylesheet before applying this snippet.
If you disable the default styles and your WooCommerce pages look completely unstyled, plain HTML with no layout, it means your theme doesn’t include WooCommerce styles and you should either re-enable the default stylesheet or add the missing styles to your theme.
Selective Disabling
Rather than disabling all WooCommerce styles at once, the filter can be used to remove only specific stylesheets while keeping others. The default array contains keys including woocommerce-general, woocommerce-layout, and woocommerce-smallscreen. You can unset individual keys from the array to keep some styles while removing others, for example keeping the layout styles while removing the general styles that your theme overrides anyway.
Block-Based Checkout
WooCommerce’s block-based cart and checkout, introduced as the default in WooCommerce 8.3, loads its styles through a different mechanism: the block stylesheet registered as wc-blocks-style. The woocommerce_enqueue_styles filter does not affect block styles. If you’re using the block checkout and need to control its styling, you’ll need to dequeue wc-block-style separately using wp_dequeue_style() on the wp_enqueue_scripts hook.
Performance Impact
On a typical WooCommerce installation, disabling the default stylesheet removes between 30KB and 80KB of CSS from shop pages depending on the WooCommerce version and which components are active. Combined with removing WooCommerce scripts on non-shop pages, this is one of the most effective CSS performance optimisations available for WooCommerce sites without touching the actual shop functionality.
add_filter( 'woocommerce_enqueue_styles', '__return_empty_array' );
