Skip to content

Instantly share code, notes, and snippets.

@vishalck
Last active January 26, 2023 21:05
Show Gist options
  • Save vishalck/f88a51b6f0c967b71b0343545dbfc159 to your computer and use it in GitHub Desktop.
Save vishalck/f88a51b6f0c967b71b0343545dbfc159 to your computer and use it in GitHub Desktop.
Change Title of WooCommerce Thank You page
<?php
add_filter( 'the_title', 'woo_title_order_received', 10, 2 );
function woo_title_order_received( $title, $id ) {
if ( function_exists( 'is_order_received_page' ) &&
is_order_received_page() && get_the_ID() === $id ) {
$title = "Thank you for your order! :)";
}
return $title;
}
@Atif0007
Copy link

Checkout Page keep loading after adding above script to function.php

@qsiadsc
Copy link

qsiadsc commented Jan 26, 2023

I pasted the same code and no changes in the order received page. Do we need to change anything in the function? All I did was copy and paste in functions.php. I realized that the id is not fetching and when I removed that condition it is showing multiple times in the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment