I have over 200 product categories and subcategories all of them have “Display type” set to “default”. I have spent hours trying to figure out why none of the categories or subcategories are showing on the store.
I added the below code to the functions.php page to show categories without products assigned and this worked for the top level categories on the homepage but does not work on the subcategories.
add_filter( ‘woocommerce_product_subcategories_hide_empty’, ‘ts_hide_empty_categories’, 10, 1 );
function ts_hide_empty_categories ( $hide_empty )
{
$hide_empty = FALSE;
}
If I change the “Display type” to “subcategories”, it seems to work. Therefore how do I change this for all categories via SQL?
Or what do I need to change in the template to always show subcategories?
I cant find anything in the Woocommerce documentation about where this field is stored or which fiel needs to be edited.