Customize the Thank You Text on WooCommerce order

, , ,

If you happen to want to change the text that is shown at the top of the order received or order confirmation page after someone successfully checks out in WooCommerce you can do so by adding a filter to the woocommerce_thankyou_order_received_text hook.  You can put in plain text or HTML in this spot and it will replace what is there.

function wpcms_wc_thank_you( $text, $order ) {
    //this is the default text that is shown
    $text = "Thank you. Your order has been received.";
    
    //this is the text that I want to display instead
    $text = "Thank you for your order. If you have any questions please contact us.";
    
    return $text;
}
add_filter('woocommerce_thankyou_order_received_text', 'wpcms_wc_thank_you', 10, 2 );

 

Skills

Posted on

December 13, 2018

Submit a Comment

Your email address will not be published. Required fields are marked *