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 and GenAI development company he has led since 2009. Eoxys builds custom AI, web and mobile applications for businesses worldwide. Shiv writes about AI app development, generative AI for business, and building software products that deliver real results. Connect with him on LinkedIn: https://www.linkedin.com/in/shiv-kumawat-eoxys/

Latest Posts

Siri AI integration for iOS apps: isometric illustration of an iPhone app connected to a glowing assistant orb and app action tiles

Siri AI Integration for iOS Apps: How to Get Your App Ready

Siri AI started rolling out in mid-September with iOS 27, and it can now find content inside apps and act…

Shiv Kumawat
October 8, 2026
Isometric illustration of an online store connected to three AI shopping agents handling product discovery, chat and checkout

AI Shopping Agents for E-commerce: Get Your Store Ready Now

This is the first holiday season where AI shopping agents are a real sales channel. Shopify’s 2026 holiday research, published…

Shiv Kumawat
October 7, 2026
Build vs buy AI hiring software: custom-built blocks versus a ready-made hiring dashboard, balanced by AI

Build vs Buy AI Hiring Software: A 2026 Decision Guide

Recruiting is where most companies meet AI first. In SHRM’s 2025 Talent Trends research, 51% of organizations said they use…

Shiv Kumawat
October 6, 2026
,

Leave a Reply

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