• Hello!

    I have used this code to display empty subcategories, but since WooCommerce 3.0 it doesn’t work anymore. Do you have ideas?

    add_filter( 'woocommerce_product_subcategories_hide_empty', 'show_empty_categories', 10, 1 );
    function show_empty_categories ( $show_empty ) {
        $show_empty  =  true;
        // You can add other logic here too
        return $show_empty;
    }
Viewing 1 replies (of 1 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    The filter is called woocommerce_product_subcategories_hide_empty

    hide_empty

    You need to return false.

    add_filter( 'woocommerce_product_subcategories_hide_empty', '__return_false' )

Viewing 1 replies (of 1 total)

The topic ‘Show Empty Subcategories’ is closed to new replies.