Support » Plugin: WooCommerce Restrict By Category » Hide Category that has non access

  • Is there a way to hide the actual category that is being blocked from the user, the plugin works great but leaves the categories that are being blocked in the widget on the side bars.



Viewing 1 replies (of 1 total)
  • Miguel


    I solve this with the following code:

    add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );
    function woo_product_cat_widget_args( $cat_args ) {
                    $cat_args['exclude'] = array('102');
                    return $cat_args;

    The number 102 is the id of that category you want to hide from the widget menu

Viewing 1 replies (of 1 total)
  • The topic ‘Hide Category that has non access’ is closed to new replies.