• Hi,

    There is a error/notice message that appears on my checkout page:

    You cannot add another “my_product_name” to your cart. There is also a View Cart button.

    I would like to remove this message. I have think I have found the related code in the ‘class-wc-cart.php’ file.

    When I tried to delete the block of code – I broke the page. 🙁

    How do I remove or modify this message/code properly?

    E.g. How could I modify it so it simply states that the product has been added successfully?

    // If it's greater than 0, it's already in the cart
    				if ( $in_cart_quantity > 0 ) {
    					wc_add_notice( sprintf(
    						'<a href="%s" class="button wc-forward">%s</a> %s',
    						$this->get_cart_url(),
    						__( 'View Cart', 'woocommerce' ),
    						sprintf( __( 'You cannot add another &quot;%s&quot; to your cart.', 'woocommerce' ), $product_data->get_title() )
    					), 'error' );
    					return false;
    				}
    			}

    Thank you in advance for your help

    J

The topic ‘Woocommerce Checkout Page Customisation’ is closed to new replies.