Created
January 18, 2018 06:50
-
-
Save anonymous/3244a2626a4d62067ec4f690a6f73b9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Change the default country in booking form. | |
*/ | |
function wp_travel_customize_default_country_setting(){ | |
if ( ! is_singular('itineraries') ) { | |
return; | |
} | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
jQuery('#wp-travel-country option[value="US"]').attr("selected",true); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'wp_travel_customize_default_country_setting', 20 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment