Website Building » WooCommerce » How Do I Create an Order Received Page in WooCommerce?

How Do I Create an Order Received Page in WooCommerce?

Last updated on January 12, 2023 @ 1:41 pm

Whenever a user makes a purchase on your WooCommerce store, they are taken to the order received page. This is the final step of the checkout process, and it is important to have a well-designed order received page so that your customers know that their order has been placed successfully. There are a few things that you should include on your order received page, and in this article, we will show you how to create an order received page in WooCommerce.

The first thing that you need to do is to add the following code to your functions.php file:

function wc_order_received_text( $text, $order ) {
$return = __( 'Thank you for your order. We will send you a 
confirmation email as soon as your order 
has been processed.', 'woocommerce' );
 
return $return; }
add_filter( 
   'woocommerce_thankyou_order_received_text', 
   'wc_order_received_text', 10, 2 );

This code will change the default text on the order received page. You can change the text to anything you want, but we recommend keeping it short and to the point.

PRO TIP: If you are not familiar with coding or website development, we recommend that you do not attempt to create an order received page in WooCommerce. This can result in breaking your website and causing other unforeseen problems.

The next thing you need to do is to add a “Return to Shop” button on the order received page. This button will allow your customers to return to your shop and continue shopping. To add this button, you need to add the following code to your functions.php file:

function wc_order_received_button( $link ) {
$link = sprintf( 
   '<a href="%s" class="button">%s</a>', 
     esc_url( wc_get_page_permalink( 'shop' ) ), 
     __( 'Return to shop', 'woocommerce' ) ); 
 
return $link; } 
add_filter( 
  'woocommerce_order_received_button', 
  'wc_order_received_button' 
); 

Conclusion:

In conclusion, if you want to create an order received page in WooCommerce, then you need to add some code snippets into your functions.php file. These code snippets will allow you to change the default text on the order received page and add a “Return to Shop” button.

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.