I have a simple function to exclude a few categories from my Woocommerce shop page. This is the following code:
add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );
function woo_product_cat_widget_args( $cat_args ) {
$cat_args['exclude'] = '12, 13';
return $cat_args;
}
Which works like a charm. However, I have now added another category that I'd like to exclude with ID 22. So I tried adding that ID as well like: '12, 13, 22'; but when I save nothing happens, the category is still there.
So just as a test, I removed ID 13 and 22 but Category 13 doesn't appear either. I tried clearing my web browsers cache and also another browser but still the same result.
I am not using a cache plugin like W3 Total Cashe etc at this stage.
Any idea on how I can resolve this? :)