Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Forked from goliver79/functions.php
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/fd734caf9f5ad9b4e386 to your computer and use it in GitHub Desktop.
Save deckerweb/fd734caf9f5ad9b4e386 to your computer and use it in GitHub Desktop.
<?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