How to customize the WooCommerce thank you page

Today we’ll look into different methods to customize the WooCommerce thank you page. We’ll investigate the different ways this page can be used for better user interaction. The thank you page can be customized in many different ways. In this artcle we’ll show you the following methods:

  • Using plugins to customize the thank you page
  • Using custom code to redirect the thank you page to a different page
  • Using custom code to modify the thank you page options (e.g. title)
  • Overriding the thank you page template

Surely, we want our customers to have the best shopping experience possible. But quite often we don’t devote enough resources to what happens after the order is placed. After all, our post-sales relationship starts at the WooCommerce thank you page.

Thus, the order received page can be used as a starting point for this new customer relationship. There we can provide guidance and tools to keep customers happy.

woocommerce thank you page

Reasons to customize the WooCommerce “thank you” page

The default WooCommerce “thank you” page is what users see after the order has been placed. Depending on the payment method at this point there is no further user interaction. Thus, this is a good time to let the customer know what comes next.

In addition to simple transactional messages, it is an opportunity to connect with your clients. For example, beyond the order details, you could show there support channels or common questions about that product. Furthermore, this is a good opportunity to give them coupons for future orders.

In general, this page contains all the user and order details under the WooCommerce order object. Therefore, it’s possible to create a user if this is a guest checkout. It’s possible to customize messages depending on the order contents, price, or location. Another idea is to add a custom user field, depending on the user profile detected for that order.

Now it’s time to see how to implement this custom WooCommerce thank you page.

Custom WooCommerce “thank you” page using free and paid plugins

NextMove Lite

NextMove WordPress plugin for custom thank you page

The NextMove Lite allows you to build custom WooCommerce thank you pages. With it, you can add a completely custom thank you page, with your own elements, videos, images or HTML code. In addition, it’s possible to add dynamic coupons or use your preferred page builder to create your pages.

YITH Custom Thank You Page for WooCommerce

YITH Custom thank you page for WooCommerce

The YITH’s Custom Thank You Page for WooCommerce allows you to set custom WordPress pages as your order’s received page. In addition, you can add Custom CSS to your page and add basic WooCommerce order details template.

Furthermore, YITH has premium features to bring even more customization to your thank you pages. With it, it’s possible to add custom pages for different products and categories. There are other interesting elements, such as upsells, PDF generation and social box for your thank you pages.

Custom “thank you” page with template redirects

When it comes to a custom WooCommerce thank you page, there are many coding options. Each has its use case, depending on your desired results.

The easiest customization option is similar to what our plugins do. You can redirect from the default WooCommerce thank you page to a different page. This page is usually one that you can freely edit, with static or dynamic content. You can do it with this snippet:

For this example, we use the template_redirect hook. It is run by WordPress when it decides which page to load for your current URL. Then we check if the URL is our thank you page, and if it’s a valid order. If it is, we redirect to our thank you page.

In case you want to change the page based on order details, we need to access the WooCommerce order object. The main issue here is to avoid exposing order data to users who shouldn’t see it. For this reason, we can’t just trust the order ID, we need to use the WooCommerce order key.

Surely, it’s possible to add further security measures, such as to require user login. But the key is secure enough, as it acts as a password. Here is how to redirect to a custom thank you page depending on the products bought:

This could be used to virtually any of your order items such as:

  • Order price
  • Products Quantity
  • Shipping method
  • Payment method
  • Shipping address (country, city, state, zip code…)
  • User email

 

Additional custom “thank you” WooCommerce page options

There are simpler ways to customize your current thank you page as well. For instance, if you just want to change some of its content you can use the WooCommerce filters for that. You can change elements, such as the page’s title and text using some custom code:

As usual, this allows for custom titles depending on the shopping cart’s content. For instance, users who bought a soccer-related product could be greeted with a nice message related to their sport.

Customizing the “thank you” page template

Lastly, there’s the template replacement option. You can add a totally custom template file in your theme and this file will be loaded as your thank you page. For this, you just need to add it in your woocommerce/checkout/thankyou.php. You could use the wp-plugins/woocommerce/templates/checkout/thankyou.php file as a reference since this is the original thank you page template.

This method allows for a whole custom design. Furthermore, it can be used in combination with other methods mentioned here, for custom designs depending on the order contents.

 

Conclusion

Today we looked into different methods to customize your WooCommerce thank you page. These methods turn your simple order received page into a marketing tool. It can be used for custom coupons, closer user interaction or even communication.

By the end of the day, you should be able to apply a custom thank you page that suits your needs. We hope you enjoyed, and see you again next time!