DEV Community

Cover image for Remove a ton of WooCommerce bloat with some simple filters.
SeanAUS120
SeanAUS120

Posted on

Remove a ton of WooCommerce bloat with some simple filters.

Every time WooCommerce releases an update they seem to add more and more bloat to it. It's still the best ecommerce system around though, but we need to add a few snippets to keep it running fast. I'm currently selling a WooCommerce Tax Rates CSV file and I wanted this site to be blazing fast.

/****DISABLE WC FILTERS****/
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' );
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
add_filter( 'woocommerce_menu_order_count', 'false' );
add_filter( 'woocommerce_enable_nocache_headers', '__return_false' );
add_filter( 'woocommerce_admin_disabled', '__return_true' );
add_filter( 'woocommerce_include_processing_order_count_in_menu', '__return_false' );
Enter fullscreen mode Exit fullscreen mode

What these are doing are pretty self-explanatory by the name of the filter. Do you think you really want to be loading "marketplace suggestions" and the WooCommerce admin (which is just a fancier way of showing you more marketplace suggestions and ads) on every admin page load? Bleh... of course not.

Currently in use at:
Windsurfing Fitness
White Elephant Gifts
1800 Printing
Printing Brooklyn
Printing New York
Rush Flyer Printing
Luxury Printing
Wild Posters
Monster Tees

Top comments (0)