I’ve seen the support thread about changing the order of countries in the select dropdown menus, but want to also change the order of states/provinces in the corresponding dropdown.
Most of our customers are Australian, with some from New Zealand. But the states/provinces dropdown displays all the NZ provinces ahead of the Australian states.
I tried changing the order with jQuery thus:
add_action( 'wp_footer', 'my_custom_js_for_checkout' );
function my_custom_js_for_checkout() {
// change slug on next line if your registration page has a different slug
if ( is_page( 'registration-checkout' ) ) {
?>
<script>
jQuery(document).ready(function($){
var options = $('.ee-reg-qstn-state optgroup');
$( options[ 1 ] ).insertAfter( $(options[ 0 ] ) );
});
</script>
<?php
}
}
but didn’t get the result I needed.
Any clues on how to put the Australian states first would be appreciated.
The support post ‘Change order of state/provinces optgroups on registration forms?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.