Last active
August 29, 2015 13:56
-
-
Save goliver79/8802282 to your computer and use it in GitHub Desktop.
[WOOCOMMERCE] Show empty categories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// WooCommerce Code | |
// Show empty categories | |
// https://gist.github.com/renegadesk/3926139 | |
// https://gist.github.com/dalemoore | |
add_filter('woocommerce_product_subcategories_args', 'woocommerce_show_empty_categories'); | |
function woocommerce_show_empty_categories( $cat_args ){ | |
$cat_args[ 'hide_empty' ] = 0; | |
return $cat_args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment