WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. prepu
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/woocommerce/

  2. IgniteWoo
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. jatt485
    Member
    Posted 1 year ago #

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

  5. jameskoster
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.