woocommerce_product_categories_widget_args doesn’t work on subpage
-
Hi,
on the shop page I see the product categories within the widget, and I’m able to hide a specific category with this code:
——————-
add_filter( ‘woocommerce_product_categories_widget_dropdown_args’, ‘exclude_widget_category’ );
function exclude_widget_category( $args ) {
$args[‘exclude’] = array(‘650’); // 650 is the id of a custom category
return $args;
}But after clicking on a category the categories-page opens an the widget displays even the previously hidden category.
So the hook-filter seems to work just on the main shop page but no on product categories pages.
Any suggestions? ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘woocommerce_product_categories_widget_args doesn’t work on subpage’ is closed to new replies.