1. Knowledge Base
  2. WooCommerce Quick View Pro
  3. Developer Documentation

How to change the ‘Added to Cart’ success message

Please note: this article is aimed at developers. If you don’t have a developer who can implement this for you, we recommend posting a job on Codeable where their pre-approved WordPress experts will send you a quote.

Need professional assistance?
We've partnered with Codeable to provide our customers with expert help if required.

When you’re using WooCommerce Quick View Pro, customers can add products to the cart from the quick view lightbox. The lightbox will close automatically and they will see a success message – “”[Product Name]” has been added to your cart.” 

WooCommerce Quick View Add to Cart Success Message

This is the same default success message that is used globally throughout WooCommerce, and doesn’t come from WooCommerce Quick View Pro.

WooCommerce has a filter that you (or your developer) can use to change the text of this message – wc_add_to_cart_message_html. This will change the ‘Added to Cart’ message wording throughout your WooCommerce store, including the quick view lightbox.

For example, you can use:

add_filter( 'wc_add_to_cart_message_html', function( $message, $products, $show_qty ) {
    $message = __( 'Product added, yay!', 'my-text-domain' );
    return $message;
}, 10, 3 );
Still need help?
If searching the knowledge base hasn't answered your question, please contact support.

Related Articles