The checkout page is a crucial component of the booking process on a travel website built using the WP Travel plugin. It is the page where customers finalize their travel booking and proceed with the payment.

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

You might be interested: Setting of Booking option in the checkout page

Steps to change text of Checkout page when no trips are selected

1. Before adding the filter code

So, to change the text of the checkout page when no trip is selected, please add the following given code in the functions.php file of your child theme

remove_action( 'wp_travel_cart_empty_message', 'wp_travel_cart_set_empty_message' );
add_action( 'wp_travel_cart_empty_message', 'wp_travel_cart_set_new_empty_message' );
function wp_travel_cart_set_new_empty_message(){
	echo "<h4>This is new message</h4>";
	$url = get_post_type_archive_link( WP_TRAVEL_POST_TYPE );
	echo sprintf( __( 'Your can add new trip. <a href="%s"> click here </a>', 'wp-travel' ), esc_url( $url ) ); 
}

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.

Conclusion

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 Facebook, Instagram, 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 wptravel.io ,buy wptravel pro