- This topic has 5 replies, 2 voices, and was last updated 4 years ago by
Support Team.
- AuthorPosts
- November 6, 2018 at 11:05 am #8432
Emotion Services
ParticipantThis question has been answered in several questions from other users.
The answers are pointing to https://gist.github.com/anonymous/d763dbd39ea993184afcaeb2461c44e3But when i enter the code from github in my function.php (child theme) it does not change the default value in the form
November 6, 2018 at 11:18 am #8433Support Team
KeymasterHello @emotion-services,
Please refer to below given link to know how you can change the default country.
http://wptravel.io/change-default-country-in-the-booking-form/
Thank you.
Regards!!
January 30, 2019 at 10:32 am #10066Emotion Services
ParticipantThe default country settings with the function does not work.
i have put the function in my child theme but in the booking form the country is not set to NL (Nederland)
develop website is on http://www.laptopvoorraad.nl there you can check the booking form
January 30, 2019 at 11:55 am #10075Support Team
KeymasterHello @emotion-services,
The code provided above does not work for the recent version so please remove above-provided code and add the code given below:
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 );
Hope this helps.
Regards!!
January 30, 2019 at 9:27 pm #10095Emotion Services
ParticipantThanks this solves the issue.
January 31, 2019 at 4:09 am #10102Support Team
KeymasterHello @emotion-services,
Glad we could help you 🙂 .
If you have any issues further then please feel free to post them.
Also, we would really appreciate if you could help us by dropping your valuable feedback in our plugin by following the link given below:
https://wordpress.org/support/plugin/wp-travel/reviews
Thank you.
Best Regards!!
Have a good day 🙂
- AuthorPosts
- The forum ‘WP Travel’ is closed to new topics and replies.