- This topic has 6 replies, 2 voices, and was last updated 5 years, 11 months ago by Catalina.
-
AuthorPosts
-
May 21, 2018 at 8:34 am #580868Catalina
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.May 21, 2018 at 9:14 am #580899LeoStaffCustomer SupportHi 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-messageMay 21, 2018 at 9:51 am #580928CatalinaHi 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.May 21, 2018 at 10:37 am #580975LeoStaffCustomer SupportThe 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/May 21, 2018 at 12:28 pm #581067CatalinaYes 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!!!
May 21, 2018 at 12:30 pm #581072LeoStaffCustomer SupportNo problem!
Very surprised that WooCommerce wouldn’t even point you to the filter…
May 21, 2018 at 12:33 pm #581079CatalinaYes, is quite weird… actually the most difficult part of setting up my website has been woocommerce.
-
AuthorPosts
- You must be logged in to reply to this topic.