[Resolved] woocommerce remove "add to cart" button for product page

Home Forums Support [Resolved] woocommerce remove "add to cart" button for product page

Home Forums Support woocommerce remove "add to cart" button for product page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #530098
    John Dowling

    I’m going crazy trying to remove the “add to Cart” button from the single product page. I’ve searched all over internet and the solution seems to be to add
    add_filter( ‘woocommerce_is_purchasable’, false );
    to the theme’s functions.php
    But that crashed the page.
    Can you help? At this point I’d even be happy just tohide it with CSS
    Thanks
    John

    #530112
    John Dowling

    Ok. I got it to work by commenting out the entire add to cart loop in pluging files
    templates/single-product/add-to-cart/simple.php
    But that was sort of the nuclear option. Could you let me know how to use css to just hide it?

    #530146
    Tom
    Lead Developer
    Lead Developer

    Give this a shot instead:

    add_filter( 'woocommerce_is_purchasable', '__return_false' );

    #530359
    John Dowling

    Worked great!
    Thanks!!!

    #530576
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.