Created
December 19, 2012 00:39
-
-
Save claudiosanches/4333440 to your computer and use it in GitHub Desktop.
WooCommerce - Show empty product 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 - Show empty product categories. | |
* | |
* @param array $args Default widget argument. | |
* | |
* @return array New arguments with hide_empty. | |
*/ | |
function wc_show_empty_categories( $args ) { | |
$args['hide_empty'] = 0; | |
return $args; | |
} | |
add_filter( 'woocommerce_product_categories_widget_args', 'wc_show_empty_categories' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment