Are you looking forward to knowing more about the steps to change the text on the Thankyou page when trips are not selected?

The thank you page is an essential component of the customer journey, as it provides customers with a sense of confirmation and acknowledgment after completing a booking or payment for their travel reservation.

Now, with the release of WP Travel v7.5, you can change the text of the Thank You page when no trip is selected using the filter code.

You might be interested: How to Change the Thank You message while using WP Travel?

Steps to change the text on the Thankyou page when trips are not selected

1. Before adding the filter code

So, to change the text of the thank you page when no trips are booked , please add the following given code in the functions.php file of your child theme.

add_action( 'wp_travel_thankyou_page_empty_message', 'wp_travel_thankyou_page_set_empty_message' );
function wp_travel_thankyou_page_set_empty_message(){
	echo "<h4>This is new message</h4>";
	$url = get_post_type_archive_link( WP_TRAVEL_POST_TYPE );
	return ( __( sprintf( 'Thank you for visting, no trip has been booked <a href="%s"> click here </a> to book a trip.', $url ), 'wp-travel-utilities', 'wp-travel-pro' ) );

For detailed information on creating a child theme, please refer to our Knowledgebase.

2. After Adding the filter code

Also, if you want to learn more about the filter hook that is used to rename fields on the checkout page, please refer specific hook page.


If you liked this article, then subscribing to our YouTube Channel for WordPress video tutorials would be the cherry on top.

You can also find us on FacebookInstagram, Linkedin, TikTok, Pinterest, Reddit, and our dedicated engaging Facebook user community,

Further, if you have any queries, please submit them to our Contact page.

Get WP Travel Pro and start creating your travel and tour booking website within minutes without any hassle of coding.

create your travel site within minutes by ,buy wptravel pro