WooCommerce : Add text to the WooCommerce thank you page.

Code

How To show Thank you massage or offers or related product or any other information on Woocomerce Thank you page?,

Woocomerce thank you page is the last impression of our site to buyer.

Your site can have a great sell, but if you please them with nice customized message that they will see after the purchase was done, more likely that they will become repeat customers.

So For attracting buyer to come again to site or for placing more order .Usually we show many offers on thank your page regarding our products for convincing user to place more orders.Offers attract buyers to go back to the website and buy again.

The first question which rise is, How to Customize the WooCommerce Thank You Page?

We can place our content using ‘woocommerce_thankyou’ hook.

Usually owner place attractive offers, or promotional content for site or may be coupons for discount etc.

function AddContentThankyou() {
  echo '<h2>Get 50% off</h2><p>Thank you for making this purchase! Come back and use coupon "<strong>GET50OFF</strong>" to receive a 50% discount on your purchase!</p>';
}
add_action('woocommerce_thankyou','AddContentThankyou');

//output
null

For loading content from any wordpress page dynamically we need to get post content and then place it is that function. we can also use shortcodes too. like related products, popular products ,sell products etc.

Example:

function AddContentThankyou() {
  $page_id = 15;
  $data= get_post( $page_id );
  echo $data->post_content;
}
add_action('woocommerce_thankyou','AddContentThankyou');

Related reading:

Shiv Kumawat

Executive Director & CEO

Shiv Kumawat is the CEO of Eoxys IT Solution LLP, the Jaipur-based IT company he has led since 2009. An AI & IT Solutions Consultant with 16+ years of experience, he works with startups and enterprises to turn ideas into market-ready SaaS platforms, mobile apps and AI-driven solutions. His team has delivered 700+ projects across SaaS, mobile and web apps, automation and AI. He previously served as Chief Technology Officer for a US company.

Latest Posts

Isometric illustration of an AI answer panel citing a business website, with an AI crawler and search pages connected to it, for an AEO services guide

AEO Services: Get Cited in ChatGPT and Google AI Overviews

When a buyer asks ChatGPT, Perplexity, Gemini or Google’s AI Overviews “who builds X in India?” or “what does Y…

Shafeeq Khan
October 19, 2026
Isometric illustration of an old AI model chip being swapped for a new one in a server that powers web and mobile apps, for a GPT-4o API migration guide

GPT-4o API Shutdown: Migrate Your App Before 14 January 2027

If your chatbot, document pipeline or internal tool still calls GPT-4o or GPT-4.1, it has a deadline. On 14 October…

Shafeeq Khan
October 19, 2026
Isometric illustration of an online store connected to an AI chatbot that handles order tracking, product search, returns and hand-off to a human support agent

AI Chatbot for E-commerce Stores: Use Cases, Stack and Cost

Most store chats are the same few questions: where is my order, will this fit, can I return it. With…

Shafeeq Khan
October 18, 2026
,

Leave a Reply

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