Support » Plugin: WooCommerce » Remove “Add to cart” from product archive page

  • Resolved Md. Imon Hossain

    (@bloggermeeting)


    HI There

    I want to remove add to cart button form product archive page.

    I have tried by those codes.

    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');

    By adding this, WordPress > wp-content > plugins > woocommerce > woocommerce.php.

    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();

    Edit: I don’t want to hide add to cart button with css

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