Last active
November 5, 2018 16:55
-
-
Save vishalck/c761f1c60047d2a83262fd1cc95b0612 to your computer and use it in GitHub Desktop.
Change Text on Order Received page in WooCommerce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('woocommerce_thankyou_order_received_text', 'woo_change_order_received_text', 10, 2 ); | |
function woo_change_order_received_text( $str, $order ) { | |
$new_str = $str . ' We have emailed the purchase receipt to you.'; | |
return $new_str; | |
} |
I somehow cannot translate this part. I used loco translate and it did work magic but this part somehow cannot be translated :(
@truexPoland the snippet should have gone in your functions.php inside your theme (or better - a child theme)
@truexPoland You need to copy this code in the functions.php of your child theme. Are you saying you are unable to translate the message?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, should I add this piece of code to the thankyou.php file or should I create a new file named woocommerce-change-order-received-text.php? What do I need to do to ensure the text is changes and displayed correctly at checkout page? Thank you