Woocommerce Remove Add to Cart Button on Category Product List Pages

How to remove the add to cart button on category view pages in woocommerce. Place this in your theme’s functions.php file.

// Remove add to cart button on Category pages.
function remove_loop_button(){
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
}
add_action('init','remove_loop_button');

2 thoughts on “Woocommerce Remove Add to Cart Button on Category Product List Pages

  1. Alexander

    Thank you for sharing this article to remove add to cart button from product list pages as i want to suggest one more things that we can also remove add to cart button for specific product pages. You have to put the code in funtions.php

    add_filter(‘woocommerce_is_purchasable’, ‘wpblog_specific_product’);
    function wpblog_specific_product($purchaseable_product_wpblog, $product) {
    return ($product->id == specific_product_id (512) ? false : $purchaseable_product_wpblog);
    }

    Reference : https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/

Leave a Reply

Your email address will not be published. Required fields are marked *

− 3 = 1