diff --git a/woocommerce-functions.php b/woocommerce-functions.php
index 5d973d00d9e..6df2c5f8f05 100644
--- a/woocommerce-functions.php
+++ b/woocommerce-functions.php
@@ -379,13 +379,17 @@ function woocommerce_add_to_cart_message() {
// Output success messages
if (get_option('woocommerce_cart_redirect_after_add')=='yes') :
- $return_to = (wp_get_referer()) ? wp_get_referer() : home_url();
-
- $woocommerce->add_message( sprintf('%s %s', $return_to, __('Continue Shopping →', 'woocommerce'), __('Product successfully added to your cart.', 'woocommerce') ));
+ $return_to = (wp_get_referer()) ? wp_get_referer() : home_url();
+
+ $message = sprintf('%s %s', $return_to, __('Continue Shopping →', 'woocommerce'), __('Product successfully added to your cart.', 'woocommerce') );
else :
- $woocommerce->add_message( sprintf('%s %s', get_permalink(woocommerce_get_page_id('cart')), __('View Cart →', 'woocommerce'), __('Product successfully added to your cart.', 'woocommerce') ));
+
+ $message = sprintf('%s %s', get_permalink(woocommerce_get_page_id('cart')), __('View Cart →', 'woocommerce'), __('Product successfully added to your cart.', 'woocommerce') );
+
endif;
+
+ $woocommerce->add_message( apply_filters('woocommerce_add_to_cart_message', $message) );
}
/**