Skip to content

Instantly share code, notes, and snippets.

@matthijs166
Last active October 16, 2017 15:41
Show Gist options
  • Save matthijs166/53a2e8b957e562f388f4f55e4805d45d to your computer and use it in GitHub Desktop.
Save matthijs166/53a2e8b957e562f388f4f55e4805d45d to your computer and use it in GitHub Desktop.
remove all the widgets in de woocomerce plugin
//remove woocomerce widgets
add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );
function woo_product_cat_widget_args( $cat_args ) {
unregister_widget('WC_Widget_Cart');
unregister_widget('WC_Widget_Layered_Nav');
unregister_widget('WC_Widget_Recently_Viewed');
unregister_widget('WC_Widget_Top_Rated_Products');
unregister_widget('WC_Widget_Layered_Nav_Filters');
unregister_widget('WC_Widget_Price_Filter');
unregister_widget('WC_Widget_Product_Categories');
unregister_widget('WC_Widget_Product_Search');
unregister_widget('WC_Widget_Product_Tag_Cloud');
unregister_widget('WC_Widget_Products');
unregister_widget('WC_Widget_Rating_Filter');
unregister_widget('WC_Widget_Recent_Reviews');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment