• Resolved inkform

    (@inkform)


    Hello, I am using the latest version of everything. Woo 3.5.4 and WP 5.0.3. I have a top level category with multiple sub-categories. If those sub-categories do not have inventory, they do not show. I have tried the Customizer, that does nothing. I have tried the answers in the forums such as adding the following to my child theme, all without success. I am using Virtue Premium as my theme. Any help is appreciated.

    Code tried:
    add_filter( ‘woocommerce_product_subcategories_hide_empty’, ‘hide_empty_categories’, 10, 1 );
    function hide_empty_categories ( $hide_empty ) {
    $hide_empty = FALSE;
    // You can add other logic here too
    return $hide_empty;
    }

    add_filter( ‘woocommerce_product_subcategories_hide_empty’, ‘__return_false’);

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter inkform

    (@inkform)

    Anyone else experiences this, or have a work-around?

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @inkform

    Thanks for reaching out to us! I edited the shop page under Appearance > Customize > WooCommerce > Product Catalog and I set it to show categories. I then added the same snippet using the Code Snippets plugin:

    add_filter( 'woocommerce_product_subcategories_hide_empty', '__return_false' );

    I now see empty categories on the shop page.

    Hi @inkform,

    We haven’t heard back from you in a while, so I’m going to close this thread out. If you still have problems, please feel free to come back and open a new topic.

    Take care

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Can’t Display Empty Sub Categories’ is closed to new replies.