title: Hide category in the WooCommerce shop page
body: <p>I've been trying to hide a specific category from SHOP page. I found this code:</p>
  
  <pre><code>add_filter( 'pre_get_posts', 'custom_pre_get_posts_query' );
  
  function custom_pre_get_posts_query( $q ) {
  
      if ( ! $q-&gt;is_main_query() ) return;
      if ( ! $q-&gt;is_post_type_archive() ) return;
  
      $q-&gt;set( 'tax_query', array(array(
          'taxonomy' =&gt; 'product_cat',
          'field' =&gt; 'slug',
          'terms' =&gt; array( 'CATEGORY TO HIDE' ),
          'operator' =&gt; 'NOT IN'
      )));
  
      remove_filter( 'pre_get_posts', 'custom_pre_get_posts_query' );
  
  }
  </code></pre>
  
  <p>I've pasted this code in my theme function.php file but I'm not achieving the result...</p>
  
  <p>Can anybody help me please?</p>