title: Hide product price and disable add to cart for specific product categories in Woocommerce
body: <p>I'm looking for the right code that hides the prices for some specific categories in Woocommerce. </p>
  
  <p>I already have the code to hide the prices on de single product page:</p>
  
  <pre><code>add_action( 'wp', 'remove_prices_based_on_category' );
  function remove_prices_based_on_category() {
      // On product single pages 
      if ( is_product() ) {
          remove_product_price( get_the_ID() );
      }
  }
  
  function return_custom_price( $price, $instance ) {
      $price = '&lt;span style="color:red; font-size:12px;"&gt;Call our office &lt;strong&gt;516.695.3110&lt;/strong&gt; for prices.&lt;/span&gt;';
      return $price; 
  }
  
  add_action( 'woocommerce_before_shop_loop_item', 'remove_product_price', 5, 1 ); // for each product on product listing page/shop page.
  function remove_product_price( $product_id ) {
      $product_id  = get_the_ID();
      $hidden_price_category_ids = array( '27419','27421' ); // Add Product Category IDs for which the product price should be hidden.
      $product_cat_ids  = get_the_terms( $product_id, 'product_cat' ); // Getting all categories for this product.
      $cat_ids = wp_list_pluck( $product_cat_ids, 'term_id' ); // Getting all category ids for this product.   
      $result = array_intersect( $hidden_price_category_ids, $cat_ids ); // Will match hidden price categories with product categories and the cat id in the array.
  
      // If a hidden price category is found
      if( !empty($result) ) {
          add_filter( 'woocommerce_get_price_html', 'return_custom_price', 10, 2 );
          remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
          remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
      } else {
          remove_filter( 'woocommerce_get_price_html', 'return_custom_price', 10, 2 );
          add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
          add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
      }
  }
  </code></pre>
  
  <p>How can I do it for WooCommerce archive pages?</p>