Support » Plugin: WooCommerce » Don't show "add to cart" in one product

  • I have a free downloadable product and when you click on that product you see the description and the number of products that you want to add to cart.
    What I need is to remove that because I have already a download button in the short description area but I want to keep the “add to cart” in the rest of the products.
    How can I do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Don’t set any type of price or inventory control. Last time I checked, that prevents the add to cart form from appearing.

    It still appears… I prefer to leave 0 € in the price becuase they can see that is a free downloadable article.

    you can add a class to it and then hide it with visibility:hidden in css

    Plugin Author James Koster


    Yup, you can hide it with CSS. There will be a unique class on the body tag per product.

    Alternatively you could use a simple php function in your theme to query the product (is_product( $id )) and unhook the add to cart button. See woocommerce-hooks.php to find what you need to unhook.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Don't show "add to cart" in one product’ is closed to new replies.