title: Avoid customer email notification for a specific product category in Woocommerce
body: <p>In Woocommerce, I am trying to stop customer order email for a particular product category in woocommerce.</p>
  
  <p>What I have tried is:</p>
  
  <pre><code>add_filter('woocommerce_email_recipient_customer_processing_order', 'wc_change_customer_new_order_email_recipient', 10, 3);
  function wc_change_customer_new_order_email_recipient( $recipient, $order ) {
   global $woocommerce;
      $items = $order-&gt;get_items();
      $category_ids = array( 10 );
      $flagHasProduct = false;
      foreach ( $items as $item ) {
          $product_id = $item['product_id'];
          $terms = get_the_terms( $product_id, 'product_cat' ); 
  
          foreach ( $terms as $term ) {  
              if( in_array( $term-&gt;term_id, $category_ids ) ) {
                  $flagHasProduct = true;
              }
          }
  
      }
      if ($flagHasProduct) {
          $recipient = "";
      } 
      $recipient = "";
      return $recipient;
  }
  </code></pre>
  
  <p>But this hook is not working at all. Any help is appreciated.</p>