How to Redirect to Custom Thank You Page in WooCommerce – 2026

Last updated on July 23rd, 2024 at 06:56 am

Creating a custom Thank You page in WooCommerce can enhance the post-purchase experience for your customers. A custom Thank You page allows you to provide personalised messages, special offers, and additional information that can help increase customer satisfaction and drive repeat business. In this guide, we will show you how to redirect customers to a custom Thank You page in WooCommerce without using a plugin.

Why Create a Custom Thank You Page?

A custom Thank You page offers several benefits:

  • Personalisation: Provide a tailored message to thank customers for their purchase.
  • Cross-Selling: Recommend additional products or services.
  • Customer Engagement: Offer discounts or promotions for future purchases.
  • Branding: Reinforce your brand’s identity and values.

Step 1: Create Your Custom Thank You Page

First, you need to create a new page in WordPress that will serve as your custom Thank You page. Follow these steps:

  1. Go to Pages > Add New in your WordPress dashboard.
  2. Title the page something like “Thank You” or “Order Confirmation”.
  3. Add your custom content to the page. This could include a thank you message, special offers, recommended products, or any other information you want to share.
  4. Publish the page.

Make a note of the URL of your custom Thank You page.

Step 2: Redirect to the Custom Thank You Page

Next, you need to add some code to your theme’s functions.php file to redirect customers to the custom Thank You page after they complete a purchase. Add the following code:

/*
 *  * Snippet: How to Redirect to Custom Thank You Page in WooCommerce – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1299
* Tested with WooCommerce 10.7.0
* "Redirect to custom thank you page"
*/ function wcsuccess_custom_thank_you_page_redirect($order_id) { // Get the order $order = wc_get_order($order_id); // Replace the URL with your custom thank you page URL $custom_thank_you_url = home_url('/thank-you/'); // Redirect to custom thank you page if (!is_admin()) { wp_safe_redirect($custom_thank_you_url); exit; } } add_action('woocommerce_thankyou', 'wcsuccess_custom_thank_you_page_redirect');

In the code above, replace /thank-you/ with the URL slug of your custom Thank You page.

See also  Limit Purchase Quantity in WooCommerce - 2026

Step 3: Test Your Custom Thank You Page

To ensure everything is working correctly, perform a test purchase on your WooCommerce store. After completing the order, you should be redirected to your custom Thank You page.

Additional Customisation

To make the most of your custom Thank You page, consider adding the following elements:

  • Order Summary: Display a summary of the customer’s order using the following shortcode in the page content:
/*
 *  * Snippet: How to Redirect to Custom Thank You Page in WooCommerce – 2026
* Author: John Cook
* URL: https://wcsuccessacademy.com/?p=1299
* Tested with WooCommerce 10.7.0
* "Display order summary on thank you page"
*/ add_shortcode('order_summary', 'wcsuccess_display_order_summary'); function wcsuccess_display_order_summary() { if (isset($_GET['order_id'])) { $order_id = sanitize_text_field($_GET['order_id']); $order = wc_get_order($order_id); if ($order) { echo '<h2>Order Summary</h2>'; foreach ($order->get_items() as $item) { echo '<p>' . $item->get_name() . ' x ' . $item->get_quantity() . '</p>'; } } } }
  • Related Products: Recommend related products to encourage additional purchases.
  • Social Media Links: Encourage customers to follow you on social media for updates and promotions.
  • Newsletter Signup: Offer an easy way for customers to subscribe to your newsletter.

Use Cases for Custom Thank You Pages

  1. Seasonal Campaigns: Tailor the Thank You page content for different seasons or holidays to align with your marketing campaigns.
  2. VIP Customers: Create a special Thank You page for VIP customers, offering exclusive deals and rewards.
  3. Feedback Collection: Include a short survey to gather customer feedback on their shopping experience.
  4. Referral Programs: Promote your referral program and encourage customers to refer friends and family.
See also  How to Allow Customers to Define the Product Price in WooCommerce - 2026

Conclusion

Redirecting customers to a custom Thank You page in WooCommerce is a powerful way to enhance the post-purchase experience and drive additional engagement. By following the steps outlined in this guide, you can create a personalised Thank You page that reinforces your brand and encourages repeat business. Customise the content and design to fit your store’s unique needs and watch your customer satisfaction and sales grow.

0 0 votes
Article Rating

Stay In Touch

Was this post helpful? Why not show your support and buy me a coffee?

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Scroll to Top
0
Would love your thoughts, please comment.x
()
x
×