Personalising the intro text on the WooCommerce Thank You page (order received endpoint) can greatly enhance the customer experience. Even just adding the customer’s first name can give that text the personable spin it lacks. If you’re using WooCommerce to take bookings, service appointments, or to sell events “Thank you. Your order has been received” doesn’t really make much sense. This quick guide shows you how to add the customer first name to the intro text and change the text completely without having to edit the template files which as you know, we strong recommend against.
/**
* Snippet Name: Change thank you page intro text on the WooCommerce Thank You Page.
* Snippet Author: ecommercehints.com
*/
add_filter( 'woocommerce_thankyou_order_received_text', 'ecommercehints_thank_you_intro_text', 20, 2 );
function ecommercehints_thank_you_intro_text( $thank_you_title, $order ){
return '
Relax ' . $order->get_billing_first_name() . ', you\'ve secured your spa booking!';
}