You can customize the WooCommerce thank you page using plugins like NextMove, or by adding code with hooks like woocommerce_thankyou
and woocommerce_order_details_after_order_table
.
Want to customize the WooCommerce thank you page to improve conversions, branding, or tracking? You’re not alone. The default thank you page in WooCommerce is functional — but boring. In 2025, post-purchase experience is where customer retention and upsells begin.
This guide covers everything: plugins for non-coders, custom PHP snippets with WooCommerce hooks, Google Analytics 4 (GA4) event tracking, dynamic thank you pages, and even multi-language setups.
Why Customize the WooCommerce Thank You Page?
- 🎯 Show dynamic offers or upsells based on the order
- 📦 Provide clear post-purchase instructions
- 🔁 Invite customers to sign up for email or rewards
- 📊 Fire GA4 or Facebook Pixel purchase events
- 🔗 Direct users to a membership dashboard or downloads
Option 1: Customize Using a Plugin (No Code)
Perfect for store owners who want flexibility without touching code.
✅ Recommended Plugin: NextMove Lite by XLPlugins
This plugin lets you build a custom thank you page visually. You can add:
- Order summary
- Social share buttons
- Upsell products (manual or automated)
- Coupon code for next order
- Custom messages & email opt-ins
Need advanced logic like order-based offers? Upgrade to Pro.
Other Plugins to Consider:
Option 2: Customize With Code Using WooCommerce Hooks
If you want full control, coding is the way to go. Below are the key WooCommerce hooks that control the thank you page.
🪝 woocommerce_thankyou
– Main Hook
This fires after the order is processed. You can use it to add upsells, tracking scripts, or custom messages.
// Add custom content after order is placed
add_action('woocommerce_thankyou', 'custom_thankyou_message', 10, 1);
function custom_thankyou_message($order_id) {
$order = wc_get_order($order_id);
echo '<div class="custom-thank-you">';
echo '<h2>🎉 Thanks for your order, ' . esc_html($order->get_billing_first_name()) . '!</h2>';
echo '<p>Your order number is ' . esc_html($order->get_order_number()) . '</p>';
echo '</div>';
}
🪝 woocommerce_before_thankyou
This runs before the thank you page is rendered. Use this for conditional redirects or early event firing.
🪝 woocommerce_order_details_after_order_table
Insert content directly after the order details table.
add_action('woocommerce_order_details_after_order_table', 'add_custom_content_thankyou');
function add_custom_content_thankyou($order) {
echo '<div class="after-order-table"><p>Get 15% off your next order with code THANKYOU15!</p></div>';
}
🪝 woocommerce_customer_completed_order
Not technically part of the thank you page, but this hook runs when the order status changes to “completed.” Useful for follow-up emails or CRM syncing.
Bonus: Fire GA4 Conversion Events on Thank You Page
If you’re using Google Tag Manager (GTM), push custom events using this snippet:
add_action('woocommerce_thankyou', 'fire_ga4_purchase_event');
function fire_ga4_purchase_event($order_id) {
$order = wc_get_order($order_id);
$total = $order->get_total();
?>
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'purchase',
value: '<?php echo esc_js($total); ?>',
currency: 'USD'
});
</script>
<?php
}
Use this with a GA4 trigger in GTM for full ecommerce tracking.
Advanced: Custom Thank You Page Per Product
You can redirect customers to a custom thank you page based on what they bought.
add_action('template_redirect', 'redirect_custom_thankyou_page');
function redirect_custom_thankyou_page() {
if (is_wc_endpoint_url('order-received')) {
$order_id = absint(get_query_var('order-received'));
$order = wc_get_order($order_id);
if ($order) {
foreach ($order->get_items() as $item) {
$product_id = $item->get_product_id();
if ($product_id === 123) {
wp_redirect(home_url('/custom-thank-you-page-product-123/'));
exit;
}
}
}
}
}
This is next-level customization — perfect for high-ticket or digital offers.
Multilingual WooCommerce Thank You Pages
If you’re using WPML or TranslatePress, your custom thank you content should be wrapped in translation functions like __()
or _e()
. Plugins like NextMove are also WPML-compatible.
Final Thoughts
Customizing the WooCommerce thank you page is a powerful opportunity to boost retention, trust, and repeat orders. Whether you use a plugin or go full code mode with WooCommerce hooks, make sure your thank you page adds real value for the customer.
Want help building a custom post-purchase flow or integrating tracking? Contact Babar Ilyas for tailored WooCommerce growth solutions.
Need more optimization guides? Check out our abandoned cart email guide or learn how to boost your WooCommerce SEO like a pro.