Archived topic
Removing Thank you in woocommerce
6 replies · Started by Catalina on May 21, 2018
Hi,
Once an order is final woocommerce has a default message that says: Thank you. Your order has been received.
I want to change that message since i have set up a thank you page. How can do this?
I tried contacting woocommerce helpdesk but they wouldn't help since i have the free version. I have checked other forums and they all talk about changing the template, which seems too complicated taking into account my CSS/PHP skills and i got petrified with the idea of messing up my website just before launching.
Is there a way to add some CSS to change the thank you message? If not, is there a CSS to just delete this thank you message?
Thanks so very much for your kind help!
Catalina.
Hi there,
Looks like there is a filter you can use. Have you tried the second solution here?
https://stackoverflow.com/questions/27987878/cant-change-woocommerce-thank-you-message
Hi Leo,
I tried it, but i get an error... I tried two things:
add_filter( 'woocommerce_thankyou_order_received_text', 'd4tw_custom_ty_msg' );
function d4tw_custom_ty_msg ( $thank_you_msg ) {
$thank_you_msg = 'These are your order specifications';
return $thank_you_msg;
}
If i use this code, i get an error called unexpected token in rows 59,61,63,65,and 66.
If i made a small change, and i put a dot before the add_filter, i get only one error, which says: Expected IDENT at line 59, col 2
Here is the code if i make the dot change:
.add_filter( 'woocommerce_thankyou_order_received_text', 'd4tw_custom_ty_msg' );
function d4tw_custom_ty_msg ( $thank_you_msg ) {
$thank_you_msg = 'These are your order specifications';
return $thank_you_msg;
}
I am clueless on which steps should i take now.
Any ideas Leo?
Thank you tons!
Catalina.
The code didn't generated any errors from my end.
Just making sure you are using one of these methods here and not adding it as CSS?
https://docs.generatepress.com/article/adding-php/
Yes that was the problem, I tried adding it as a CSS... I followed the instructions of the article you gave me. I was quite scared to do it, but at the end went for it, and changed it. Thanks so much for your support Leo!!!
No problem!
Very surprised that WooCommerce wouldn't even point you to the filter...
Yes, is quite weird... actually the most difficult part of setting up my website has been woocommerce.