title: showing add to cart for logged in users only..woocommerce
body: <p>been using this code to hide prices..</p>
  
  <pre><code>add_filter('woocommerce_get_price_html','members_only_price');
  function members_only_price($price){
  if(is_user_logged_in() ){
      return $price;
  }
  else return '&lt;a href="' .get_permalink(woocommerce_get_page_id('myaccount')). '"&gt;Login&lt;/a&gt; or &lt;a href="'.site_url('/wp-login.php?action=register&amp;redirect_to=' . get_permalink()).'"&gt;Register&lt;/a&gt; to see price!';
  }
  </code></pre>
  
  <p>tried modifying it to use for hiding add to cart as well..but no avail..
  anyone?</p>