I tried code below to hide a Uncategorized category, but in others languages this category is visible, how to fix it
function my_product_subcategories_arg( $args ) {
$uncategorized = get_option( 'default_product_cat' );
$args['exclude'] = $uncategorized;
$args['hide_empty'] = 0;
return $args;
}
add_filter( 'woocommerce_product_subcategories_args', 'my_product_subcategories_arg', 10, 1 );
2
Answers
This helped me:
So for all other categories it works? If yes then pick a different category that you don’t need to hide and make it default: