So, are you looking forward to setting an Offset while booking with WP Travel?

An offset for booking is a feature that allows users to set a date restriction before a booking can be confirmed.

It enables users to define a specific period or duration that must elapse before the booking can be made.

For example, consider today’s date as April 22, 2024, and the offset for booking is set to 2 days. It means that users cannot book any service less than 48 hours in advance.

This feature is useful when the service provider requires advance notice or preparation time before accepting bookings.

Learn more: How To Add Exclude Dates For All The Trips?

Steps to Set an Offset while Booking with WP Travel

Step 1: Add code in the functions.php file

To set an offset for booking with WP Travel, please add the following code in the functions.php file of your child theme or simply you can add it through code snippets.

add_filter( 'wptravel_booking_offset', function(){ 
return 2; 
} );

Step 2: Check Knowledgebase if you want to create child theme

If you need more information on creating a child theme, please check out our knowledge base.

Starting from today’s date, which is April 22, 2024, users can only select the calendar date starting from April 24th to book a service.

If you want to learn more about the filter hook available in the WP Travel plugin, you can refer to the hook page.

Check the WP Travel documentation to learn more about configurations, modules, payments, and shortcodes.

Your feedback helps us improve. Feel free to share your thoughts!

Need assistance? Contact our support team, join our Facebook community, and subscribe to our YouTube Channel for video tutorials.

You can also find us on Facebook, Instagram, LinkedIn, TikTok, and X. Thank you for choosing WP Travel.

If you are a WP Travel Free user thinking about upgrading to Pro, simply click on the banner below.

Get WP Travel Pro