WooCommerce: How to Redirect Users to a Custom Thank You Page?

I believe this is the wrong question – and in a moment I will explain you why.

The right question to ask should be: “Is it a good idea to redirect WooCommerce customers to a custom thank you page?”. And the correct answer is: “No”.

Why you shouldn’t redirect to a custom thank you page

There are two main reasons for this.

Unless you’re an expert coder, redirecting to a custom thank you page (here’s a snippet to achieve WooCommerce redirection upon purchase by the way) will mean losing the order details summary.

In plain English, your custom thank you page will not display the WooCommerce order details. Unless you code this, of course.

Second, most tracking and reporting within WooCommerce, Google Analytics, and other WooCommerce integrations only work on the default thank you page. In plain English, if you redirect to a custom URL, the conversion will not be recorded into Google Analytics if you use the recommended WooCommerce Google Analytics plugin.

What should you do instead

The WooCommerce default thank you page can be customized via PHP (if you’re not a developer you can hire someone to do this for you).

In plain English, the thank you page can display conditional content based on the product/s purchased (for example, a banner, a survey, a specific download), you can remove or reposition default elements, you can add social share buttons or a lovely thank you note.

If you see what I mean, it’s better to keep the default thank you page and customize it, as opposed to redirect to a custom URL where you’d lose order details, tracking and create more confusion. In fact, to what page would you redirect if there were 2 different products with 2 different thank you pages in the order?

Related content

  • WooCommerce: Cart and Checkout on the Same Page
    This is your ultimate guide – complete with shortcodes, snippets and workarounds – to completely skip the Cart page and have both cart table and checkout form on the same (Checkout) page. But first… why’d you want to do this? Well, if you sell high ticket products (i.e. on average, you sell no more than […]
  • WooCommerce: Disable Payment Method If Product Category @ Cart
    Today we take a look at the WooCommerce Checkout and specifically at how to disable a payment gateway (e.g. PayPal) if a specific product category is in the Cart. There are two tasks to code in this case: (1) based on all the products in the Cart, calculate the list of product categories in the […]
  • WooCommerce: Add Privacy Policy Checkbox @ Checkout
    Here’s a snippet regarding the checkout page. If you’ve been affected by GDPR, you will know you now need users to give you Privacy Policy consent. Or, you might need customer to acknowledge special shipping requirements for example. So, how do we display an additional tick box on the Checkout page (together with the existing […]
  • WooCommerce: Redirect to Custom Thank you Page
    How can you redirect customers to a beautifully looking, custom, thank you page? Thankfully you can add some PHP code to your functions.php or install a simple plugin and define a redirect to a custom WordPress page (as opposed to the default order-received endpoint). This is a great way for you to add specific up-sells, […]
  • WooCommerce: Disable Payment Gateway by Country
    You might want to disable PayPal for non-local customers or enable a specific gateway for only one country… Either way, this is a very common requirement for all of those who trade internationally. Here’s a simple snippet you can further customize to achieve your objective. Simply pick the payment gateway “slug” you want to disable/enable […]

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

7 thoughts on “WooCommerce: How to Redirect Users to a Custom Thank You Page?

  1. Hi Rodolfo,
    a question for you … at site am using bank payment and plugin for it. All is fine but last step makes me trouble for a days…namely its about when customer on bank page decide to simply cancel order before its confirmed or lets say card is moneyless and transaction cant be make… in this case site is making me back to thank you page but title is that order has been successefuly made and order is accepted… it makes confusion between customers and i really have no idea how to fix it. In plugin i am using there is a place where to enter postback url in case i need it and i put mysite.co.rs/checkout/order-received/{order_id}/? but result is same or i got empty page… Any idea how to resolve it? Thanks in advance

    1. Hello Sofija, thanks so much for your comment! Unfortunately this looks like custom troubleshooting work and I cannot help here via the blog comments. Thanks a lot for your understanding! ~R

    2. Hi Sofija,

      I’m guessing you have this sorted now but could I ask what payment provider this issue is with?

      On of the stores I manage is a Magento 1 store using PaymentSense for credit card payments – if a customer doesn’t make payment or simply cancels out from payment page the stock is reduced and the order shows as paid.

      Works fine for other payment providers so was wondering if your issue was also with PaymentSense.

      Regards

      Steve

  2. Hi,

    Maybe you can help me.

    Thank you page doesn’t show the shipping address, I will like not only the billing address to show. How I can fix this?

    Thanks

    Best regards

    Adriana

    1. Hello Adriana, thanks so much for your comment! Unfortunately this looks like custom troubleshooting work and I cannot help here via the blog comments. Thanks a lot for your understanding! ~R

  3. “In plain English, the thank you page can display conditional content based on the product/s purchased (for example, a banner, a survey, a specific download), you can remove or reposition default elements, you can add social share buttons or a lovely thank you note.”

    Do you have a tutorial on this? I’d like to display an embeddable booking form (not a shortcode) when a customer purchases certain products.

    1. Mike, thanks so much for your comment! Yes, this is possible – but unfortunately this is custom work and I cannot provide a complementary solution here via the blog comments. Thanks a lot for your understanding! ~R

Leave a Reply

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