If you want to hide add to cart button form product page then you have to follow this:
Go to Section->product-template.liquid file and find name=“add” (that’s your add to cart button) now add condition like this:
{% if customer %}
//Add your existing add to cart code here
{% endif %}
So now add to cart button only show if user login. If you want to do on collection page then you have to do same in Snippet->product-grid.liquid or Snippet->product-cart.liquid.
Thanks so much for helping with this. Unfortunately, when I add this code, the add to cart buttons is still visible. I’ve attached a photo of this section, do you see a problem or have any other suggestions on why this might be happening?
I’m not sure I follow. So the code I shared, that is not the problem? For dawn the product grid is main-product-collection-grid. What should I look for in this snippet?