I’ve been testing for over an hour but finally I found a way to make this work. When you are in “Edit Order” view under WordPress Dashboard > WooCommerce > Orders, there is a dropdown of “Order actions”: “Email invoice”, “Resend new order notification”, etc.
A major problem I’ve always had while troubleshooting or working on the WooCommerce thank you page was that I had to build that URL by hand in order to view it again or to avoid placing yet another test order (it follows the format e.g. https://example.com/checkout/order-received/214008/?key=wc_order_aHB6YrmLOZIKP).
Well, from today, you can access that order thank you page URL directly from the “Order actions” dropdown. Enjoy!
PHP Snippet: Add “View Thank You Page” to “Order actions” @ Edit Order WP Admin Pages
Note: remove the $order->has_status() check if you wish this to appear for ALL order statuses.
Please let me know in the comments if everything went as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting.
Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!
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.
20 thoughts on “WooCommerce: View Thank You Page @ Order Admin”
I just tried this out on my site and it works in April 2023. Thanks!
I tried this code but its not working.
i got these error:
syntax error, unexpected ‘function’ (T_FUNCTION)
The syntax error should also tell you the position (line) and file where the error is. Can you share that please?
Beautiful. Shopify has this built in and I was doing it manually in woo. Keep up the good work.
FYI This was working but now isn’t. It just isn’t there, in the box in the admin page at all.
We have a seasonal product and so I don’t know how long this hasn’t been working (few months max)
Every other snippet I have is working as far as I am aware.
Thank you for all the work you do.
Still works for me. Is the order status within the “wc_get_is_paid_statuses” array?
The code works perfect, except for one thing. Currently the thank you page opens in the same window and so it makes me exit the backend. Is there a way to open it in a new tab?
Hello Nerea, thanks so much for your comment! Yes, may be possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Thank you very much! excellent.
Can you help me put a link similar to this one on the My Account page? With that the customer has access when they need it.
Hi Ricardo, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Never thought about this functionality, but now I need to test and see it working 🙂
Thanks for the codes but thank you even more for the different approaches and way of thinking that you bring here
Hey Rodolfo !
This one is brilliant, thanks !
Although I already see a few case in which such a function can be useful, would you mind telling us more about why you implemented it so far ?
Cool! For example I use it while troubleshooting Thank you page errors, or checking if Thank you page customization is working
Thank you for thinking of sharing this snippet. It works great but what happens if you use a custom Thank You Page that includes extra content before the order details? How can we display that content here?
This only works with the default WooCommerce thank you page, sorry. Though, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Very, very needed 🙂 Magic! Thank You!