Where Do You Set Thank You Message in WooCommerce?
WooCommerce is one of the most popular eCommerce platforms for WordPress, and it gives store owners a lot of room to shape the customer experience. One piece that gets overlooked constantly is the “Thank You” message shown right after checkout. It confirms the order, sure. But it’s also the very last thing a customer sees before they close the tab, and most stores waste that moment on a single generic line. Here is exactly where that message lives in WooCommerce, how to change it, and what actually belongs on it.
Why the Thank You Message Deserves Attention
Think about what a customer is doing at that exact second. They just handed over money. They’re either relieved (order placed, done) or slightly anxious (did that actually work, when will it arrive, who do I contact if something’s wrong). A default WooCommerce thank-you page answers almost none of that beyond an order number.
Customizing it does a few concrete things. It reinforces your brand voice at the exact moment someone has decided to trust you with their money. It’s a natural spot to surface order specifics, delivery timelines, support contacts, or a discount for the next purchase. It can nudge a first-time buyer toward becoming a repeat one, and it can quietly collect feedback before the customer forgets why they bought in the first place.
Where WooCommerce Actually Stores This
There’s no single “Thank You Message” text box hiding in WooCommerce settings, which is the source of most of the confusion around this. The order-received page (what WooCommerce calls the Thank You page internally) is generated dynamically from the Checkout page template. You won’t find a field to type a custom sentence into. Instead, you either hook into the page programmatically or install something that does it for you.
To confirm which page WooCommerce is using as the order-received endpoint, go to WooCommerce > Settings > Advanced. The Page setup section lists your Cart, Checkout, and My Account pages. The Checkout page is the parent of the order-received page, WooCommerce appends /order-received/ to that URL automatically once a purchase completes. You can’t retarget this to an arbitrary page without breaking the order confirmation logic, so don’t try to swap in a regular WordPress page here.
Method 1: Custom Code via the Thank You Hook
WooCommerce fires a dedicated action, woocommerce_thankyou, on the order confirmation page, and it passes the order ID as an argument. That single hook is the cleanest way to inject anything: a message, a countdown timer, a related-products block, whatever you need.
add_action( 'woocommerce_thankyou', 'custom_thankyou_message', 10, 1 );
function custom_thankyou_message( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_order( $order_id );
echo '<p>Thank you for your order! We appreciate your business and look forward to serving you again.</p>';
echo '<p>Your order number is ' . esc_html( $order->get_order_number() ) . '.</p>';
}
The $order object gives you access to more than just the order number. You can pull the billing name with $order->get_billing_first_name(), the shipping method with $order->get_shipping_method(), or the total with $order->get_formatted_order_total(). That’s how stores build the “Hi Sarah, your order #4821 for $89.00 is confirmed” version instead of a flat, impersonal line.
To add this: go to Appearance > Theme File Editor (or, better, use a code snippets plugin so a theme update doesn’t wipe it out), open functions.php, paste the snippet, adjust the message, and save. Visit the confirmation page after a fresh order to check it rendered correctly.
A word of caution here. Editing functions.php directly on a live theme means any theme update erases your change. Use a child theme or a lightweight snippet plugin instead. Also keep a backup of the file before you touch it, a stray missing semicolon in this file will take the whole site down.
Also Read: Top 10 Best CMS Software for Building Your Website
Method 2: Plugins Built for This
If touching PHP isn’t something you want to do, several plugins exist purely to customize the WooCommerce thank-you experience. Options in this space typically let you set a different message per product, redirect to a different page based on order status, or add content blocks (upsells, reviews requests, social links) without code.
The setup pattern is roughly the same across all of them: install and activate from Plugins > Add New, then look for the new settings panel under WooCommerce > Settings or its own top-level menu item. From there you build the message using their editor, sometimes with merge tags for the customer’s name or order total, and save.
Plugins add convenience but also add another moving part that has to survive future WooCommerce updates. For a single static message, custom code is often more durable long-term. For anything involving conditional logic (different message for digital vs. physical orders, different message for first-time vs. returning customers), a plugin usually saves real development time.
What Actually Belongs on a Good Thank You Page
A gratitude sentence alone is wasted space. Here’s what a thank-you page should realistically communicate, in rough priority order:
- Confirmation the order went through, with the order number front and center so the customer can reference it in any support request.
- What happens next, an expected shipping window for physical goods, a download link for digital products, or a note that a vendor will be in touch for services.
- How to get help, a support email or link, visible without scrolling.
- One soft next step, not five. A single relevant recommendation, a request to join a community, or an invitation to follow on social. Piling on five competing calls to action dilutes all of them.
Notice what’s missing from that list: aggressive upsell popups, unrelated newsletter signups, and walls of legal text. Save those for elsewhere. The thank-you page has one job, and it isn’t to sell something new to someone who just finished buying.
Digital Products, Physical Products, and Services Need Different Messages
A single generic thank-you message across every product type is a missed opportunity. A customer who bought a downloadable PDF doesn’t care about shipping estimates. A customer who bought a physical product doesn’t need a download link. And a customer who just booked a service through your store needs something entirely different from either.
If your store sells services rather than physical goods, the thank-you page needs a different job entirely. A generic “order confirmed” message doesn’t tell a buyer what happens next when they’ve just hired someone rather than bought a box. WP Sell Services handles this by routing buyers straight into order messaging with their vendor after checkout, so the thank-you moment becomes the start of a conversation instead of a dead end. That single change, from “here’s your receipt” to “here’s how to reach the person doing the work”, does more for customer confidence than any styling tweak.
You can replicate a version of this logic with custom code by checking the order’s product types inside the woocommerce_thankyou hook and branching your message accordingly. It takes a bit more PHP, but it means every customer sees a message relevant to what they actually bought.
Testing the Message Before It Goes Live
Don’t trust that a code snippet or plugin setting works just because it saved without an error. Test it the same way a real customer would encounter it.
Create a throwaway product priced at a cent, set it to draft or private so it doesn’t show in your catalog, and run through the full checkout with a test payment method (WooCommerce ships with a sandboxed test gateway in most setups, and Stripe and PayPal both have test modes). Confirm the message shows the right variables filled in, not a literal “$order->get_billing_first_name()” string sitting on the page because a quote mark broke somewhere.
Check it on mobile specifically. A message block that looks fine on a 1440px desktop screen can wrap awkwardly, overlap the order table, or get pushed below the fold entirely on a phone, which is where a large share of your checkout traffic is actually happening. Open the confirmation page in your phone’s browser, not just the developer tools mobile emulator, real devices sometimes render things differently.
A Note on WooCommerce Blocks Checkout
Newer WooCommerce installs use the block-based checkout built on the Checkout and Cart blocks rather than the older shortcode checkout. The order-received page and the woocommerce_thankyou hook still work the same way underneath either setup, the hook fires server-side regardless of which checkout front end rendered the form. If you’re on the block checkout and your custom message isn’t appearing, the more likely culprit is a caching plugin serving a stale version of the page rather than the hook itself failing.
Comparing the Two Main Approaches
| Approach | Best for | Setup time | Survives WooCommerce updates? |
|---|---|---|---|
| Custom code (functions.php or snippet plugin) | A single static or conditionally-branched message | 15 to 30 minutes | Yes, if hooked correctly |
| Dedicated thank-you page plugin | Non-developers, per-product messaging, upsell blocks | 10 to 20 minutes | Depends on plugin maintenance |
Common Mistakes Stores Make Here
A few patterns show up over and over on badly-configured thank-you pages, worth checking your own store against.
The order number gets buried below a wall of marketing copy. If a customer has to scroll past three paragraphs of brand story to find their order reference, that’s a design failure, not a content one. Put the order number and total near the top, above anything promotional.
Support contact info is missing entirely. If something goes wrong with the order, and eventually something will, the customer shouldn’t have to hunt through your footer or a separate contact page to find out how to reach you. A single line with an email address or support link costs nothing and saves a frustrated customer from bouncing.
The message doesn’t account for guest checkout. If a customer bought without creating an account, don’t reference “your account dashboard” or “your order history” on the confirmation page, they have neither. Test your message logic against both logged-in and guest purchase paths.
Mobile styling breaks the layout. This one comes up constantly with custom code additions, a developer builds and tests on a wide desktop monitor, ships it, and nobody checks how the block wraps on a 375px screen. Given how much checkout traffic arrives from phones, this is not a minor edge case.
Accessibility on the Confirmation Page
The thank-you page is easy to overlook in an accessibility audit because it’s transactional rather than content-heavy, but it still needs the basics. Any custom message you inject through the woocommerce_thankyou hook should use semantic HTML, real heading tags rather than bold paragraph text pretending to be a heading, and sufficient color contrast if you’re styling the block with custom CSS. If you add an icon-only button (a share icon, a download icon), give it an aria-label so screen reader users know what it does. None of this is complicated, but it’s easy to skip when the page feels like an afterthought.
Tracking Whether Your Changes Actually Help
Once you’ve customized the message, you can measure whether it’s doing anything. If you added a discount code or a related-product link, check whether click-through or redemption rates on that link move over the following weeks. If you’re trying to reduce “where is my order” support tickets, compare ticket volume before and after adding clearer next-steps language. Most stores skip this step entirely and just assume the new message is better because it looks nicer, but a page that gets real customer traffic on every single purchase is worth actually measuring.
Frequently Asked Questions
Can I redirect customers to a completely different page after checkout?
Yes, but it takes custom code hooking into woocommerce_thankyou or a dedicated redirect plugin. Be careful doing this: redirecting away from the native order-received page can break order tracking scripts (conversion pixels, analytics events) that many stores fire specifically on that page.
Will editing functions.php break my site?
A syntax error in that file can take the entire site down until it’s fixed. That’s exactly why a child theme or a snippet manager plugin is the safer route, mistakes there are contained rather than site-wide.
Does the thank-you message affect SEO?
Not directly. The order-received page is typically excluded from search indexing by default since it’s a private, session-specific URL. Its value is entirely in the customer experience, not in search rankings.
Should I include a discount code on the thank you page?
It depends on your margins and repeat-purchase cycle. For low-frequency, high-consideration purchases, a discount here can feel premature, the customer hasn’t even received the item yet. For subscription boxes or consumables, a next-order discount tends to perform well because the customer is already primed to think about reordering.
Can I run more than one custom function on the thankyou hook?
Yes. Multiple plugins or snippets can hook into woocommerce_thankyou at once, and WooCommerce runs them in priority order (the number passed as the third argument to add_action). If your message shows up in an odd position relative to other content on the page, adjusting that priority number usually fixes it. Lower numbers run earlier.
What if I want a different message per product category rather than per product type?
Inside the hooked function, loop through $order->get_items() and check each item’s product category with has_term(). You can then branch your output based on which categories appear in the order. This is more code than a flat static message, but it’s the same approach stores use to show different post-purchase instructions for, say, downloadable software versus a physical accessory sold in the same store.
Getting the Thank You Page Right
Customizing the Thank You message in WooCommerce is a small technical task with an outsized effect on how a customer feels about the purchase they just made. Whether you edit it through custom code or lean on a plugin, keep the content matched to what the customer actually needs to see next: order details, next steps, or a genuine invitation back. That’s what turns a first-time buyer into a returning one.
Skip the generic “thanks for your order” line if you can help it. A specific, relevant message costs you fifteen minutes of setup and pays for itself the first time it stops a support ticket from being filed.
One more thing worth doing before you call this finished: read the message out loud as if you were the customer who just paid. Does it actually answer “did this work” and “what happens now”? If it only answers the first question, you’ve built a receipt, not a thank-you page. The two aren’t the same thing, and customers can tell the difference even if they can’t articulate why one store’s confirmation page felt reassuring and another’s felt like a dead end.
Most stores set this page up once during the initial WooCommerce configuration and never look at it again. Small stores especially treat it as a checkbox item during setup and never revisit it. Larger stores that do revisit it tend to find it’s one of the most valuable single pages on the site, precisely because every paying customer sees it, without exception, right at the moment they’re most engaged with the brand.
Interesting Reads:
5 Best Google Forms Alternative for 2024
5 Best Cold Email Software for 2024
How to Apply Multiple Shipping Classes to a Variable Product in WooCommerce