• Resolved manojredhu

    (@manojredhu)


    I was trying to remove add to cart button using below codes but it didn’t work, can anyone help. I’m using newspaper theme.

    function WC() {
    remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);
    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’);
    return WooCommerce::instance();
    }
    OR add_filter( ‘woocommerce_is_purchasable’, ‘__return_false’);

Viewing 1 replies (of 1 total)
  • Hey there, @manojredhu! Thanks for contacting us. I’m happy to help you.

    While we can’t provide support for code customization as per our support policy. Still, if you need customization, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    Having said that, do you mind sharing more about why you want to remove the add to cart button? Depending on your goals, we might have another way for you to achieve it.

    Furthermore, I’d like to understand your site properly. Please share with us the System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support.

    Looking forward to your reply.

    Have a wonderful day!

Viewing 1 replies (of 1 total)
  • The topic ‘Remove Add to Cart’ is closed to new replies.