Hey guys, are you wondering how to Change the Default Country in the Booking Form?

Well, we have have detailed step-by-step guide provided below to change the Default Country in the Booking Form concisely with WP Travel.

You might be interested: What is On-Page Booking and How to execute it in WP Travel?

Steps to Change the Default Country in the Booking Form

Step 1: Use the filter code

If you want to change the default country displayed in the country field in the booking form of the checkout page then you can do so using the filter code.

before change default country

For detail information regarding how to create a child theme, please refer to our Knowledgebase.

Step 2: Add given code in functions.php of your child theme

To change the default country in the booking form on the checkout page, please add the below-given code in the functions.php file of your child theme.

function wp_travel_customize_booking_form($fields) {
	$fields['traveller_fields']['country']['default'] = 'NL';
	$fields['billing_fields']['country']['default'] = 'NL';
	    return $fields;
}
 add_filter( 'wp_travel_checkout_fields', 'wp_travel_customize_booking_form', 99 );

Note: The default country field in the Traveller form will only be changed in case of activation of the WP Travel Pro plugin.

Please replace the “NL” country code with the required country code.

After:

change default country

Conclusion

Check 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