title: WooCommerce Hide Add To Cart Button on Loop & Product Page
body: <p>I'm working on a woocommerce theme and I'm required to hide the add to cart button for products that have 0 as price, as these products may only be inquired and not added to cart. I have successfully hidden the 'add to cart' button on the product page however, I am having a hard time doing so on the shop page/category page. </p>
  
  <p>Below is my code for filtering the add to cart as well as changing the default 'Free!' message. </p>
  
  <pre><code>add_filter( 'woocommerce_variable_free_price_html',  'hide_free_price_notice' );
  
  add_filter( 'woocommerce_free_price_html',           'hide_free_price_notice' );
  
  add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' );
  
  
  /**
  * Changes woocommerce default 'Free!' to return message
  */
  function hide_free_price_notice( $price ) {
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 30 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
  
  
  
    return 'Please inquire for pricing';
  </code></pre>
  
  <p>}</p>
  
  <p>I have also tried filtering all add to cart buttons on loop, however this did not work either.</p>
  
  <pre><code>add_action( 'woocommerce_after_shop_loop_item', 'remove_add_to_cart_buttons', 1 );
  
  function remove_add_to_cart_buttons() {
      remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
  </code></pre>
  
  <p>}</p>
  
  <p>Any suggestions? I'm looking to see if I can hide it with CSS...</p>