Created
April 19, 2014 17:38
-
-
Save goliver79/11091523 to your computer and use it in GitHub Desktop.
[WOOCOMMERCE] Hide empty categories in Woocommerce Widget 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 | |
| /* | |
| * @goliver79 | |
| * woocommerce hide empty categories in woocommerce widget "product categories" | |
| */ | |
| function woo_hide_product_categories_widget( $list_args ){ | |
| $list_args[ 'hide_empty' ] = 1; | |
| return $list_args; | |
| } | |
| add_filter( 'woocommerce_product_categories_widget_args', 'woo_hide_product_categories_widget' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Same here. Not working