Created
February 8, 2018 10:38
-
-
Save webdados/c5c02a41dd033c4b1def96aedecffb5b to your computer and use it in GitHub Desktop.
Hide WooCommerce (3.3 and above) default category
This file contains 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 | |
/* Hide WooCommerce default category on the frontend */ | |
add_filter( 'woocommerce_product_subcategories_args', 'woocommerce_hide_default_category' ); | |
function woocommerce_hide_default_category( $args ) { | |
$args['exclude'] = get_option( 'default_product_cat' ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment