I am trying to find out how to remove or replace the double quotes from the WooCommerce add to cart message.
“UNF #10 x 1/4″” has been added to your CART.
I am dealing with some Imperial Measurements, and the double quotes look untidy surrounding the " for inch in the Product Name.
I have added filters at every stage of the message display
- my last attempt is shown below
- but I've also tried
add_filter ( 'wc_add_to_cart_message_html', 'wc_add_to_cart_message_html_filter', 10, 2 );
I have tried the find string
- as "“"
- and escaped "\“"
- and as Unicode
I can replace any other part of the message.
But I can't remove or replace those pesky quotes.
add_filter ( 'woocommerce_add_success', 'woocommerce_add_success_filter', 10, 1 );
function woocommerce_add_success_filter ( $message ) {
$message = str_replace("basket","CART", $message);
$message = str_replace("\“","[ ", $message);
return $message;
}
Any help or clues?