Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce hide/exclude categories from category widget
/* Exclude WC Product Categories */
function peltopiri_exclude_wc_widget_categories($cat_args) {
$cat_args['exclude'] = array('16');
return $cat_args;
add_filter('woocommerce_product_categories_widget_dropdown_args', 'peltopiri_exclude_wc_widget_categories');
add_filter('woocommerce_product_categories_widget_args', 'peltopiri_exclude_wc_widget_categories');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment