WooCommerce - excelling eCommerce
Don't show "add to cart" in one product (5 posts)

  1. prepu
    Posted 2 years ago #

    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?


  2. IgniteWoo Team
    Posted 2 years ago #

    Don't set any type of price or inventory control. Last time I checked, that prevents the add to cart form from appearing.

  3. prepu
    Posted 2 years ago #

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

  4. jatt485
    Posted 2 years ago #

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

  5. jameskoster
    Plugin Author

    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.