How to Customize WooCommerce Thank You Page (With & Without Code)

WooCommerce thank you page customization with code and plugin options shown visually

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.

FAQs: Customize WooCommerce Thank You Page

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.

The most common hook is woocommerce_thankyou. It runs after an order is completed and is perfect for adding custom content, scripts, or redirects.

Yes. With custom code, you can redirect based on order content. You can even create thank you pages per product or per customer role for personalized post-purchase flows.

You can add upsells, related products, tracking scripts, dynamic messages, coupon codes, download links, or newsletter opt-ins — anything that enhances the post-purchase experience.

Absolutely. Plugins like NextMove or WooCommerce Thank You Pages allow full visual customization without needing to write code.

Use Google Tag Manager and fire a purchase event using the woocommerce_thankyou hook. Push order total, currency, and other event parameters to your GA4 dataLayer.

Yes. With a bit of PHP, you can detect product IDs in the order and redirect users to a custom page based on what they bought.

If you’re using hooks and not overriding template files directly, your customizations will survive WooCommerce updates. Always use child themes or custom plugins for safety.

No — if done correctly. You can manually place GA4 or Pixel tracking in your custom code or use Tag Manager for safer deployment across variations.

Yes. Use WPML or TranslatePress and wrap custom messages with translation functions like __() or _e(). Plugins like NextMove are also multilingual-ready.

Leave a Reply

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

    Branding Design Development Front-End Website-Redesigning Shopify-Development WordPress-Development
    Branding Design Development Front-End Website-Redesigning Shopify-Development WordPress-Development
    We love crafting unforgettable
    digital experiences, brands and websites with people like you.
    Follow us:
    Let’s get started
    We'd love to hear about your project.
    © 2025 babarilyas. All rights reserved.