Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created May 4, 2016 15:35
Show Gist options
  • Save joshfeck/c95b0a163c3d9c2c37c8e4d6efa47dcb to your computer and use it in GitHub Desktop.
Save joshfeck/c95b0a163c3d9c2c37c8e4d6efa47dcb to your computer and use it in GitHub Desktop.
function my_move_australia_before_nz() {
?>
<script>
jQuery(document).ready(function($) {
var aussie = '.ee-reg-qstn-state optgroup[label="Australia"]';
var kiwi = '.ee-reg-qstn-state optgroup[label="New Zealand"]';
$(aussie).insertBefore(kiwi);
});
</script>
<?php
}
add_action( 'AHEE__EE_Form_Section_Proper__localize_script_for_all_forms__begin', 'my_move_australia_before_nz' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment