×

 

Home Contact Us Payments SC Commerce SC Commerce Docs SC Commerce Snippets

Simply Computing

We make websites. Simple.

Include a WordPress page on order received page

You can customise the “order received” page with this code snippet. You may want to add a special thank you message or image to be displayed when the customer has completed an order. You first need to save your message as a standard WordPress page, then insert the ID number of that page into the code below.

		/**
 * Include a WordPress page on order received page
 */

add_action('woocommerce_thankyou', 'sc_woo_custom_order_received_page', 5);

function sc_woo_custom_order_received_page() {

  $page_id = 1643; 
  $page_object = get_post($page_id);
  echo $page_object->post_content;

}
	
   View Raw Code ID: 91037