Skip to content

Instantly share code, notes, and snippets.

@MaryOJob
Last active June 19, 2020 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryOJob/11482551cff77bea7270f4fef7768e8d to your computer and use it in GitHub Desktop.
Save MaryOJob/11482551cff77bea7270f4fef7768e8d to your computer and use it in GitHub Desktop.
Move the Country field back to the bottom after post code when using the pmpro address for free levels add-on and pmpro state dropdown add-on
<?php // Do not copy this line
function my_pmpro_fix_billing_fields() {
?>
<script>
jQuery(document).ready(function() {
jQuery("#pmpro_billing_address_fields>.pmpro_checkout-fields").append( jQuery( ".pmpro_checkout-field-bcity" ) );
jQuery("#pmpro_billing_address_fields>.pmpro_checkout-fields").append( jQuery( ".pmpro_checkout-field-bzipcode" ) );
jQuery("#pmpro_billing_address_fields>.pmpro_checkout-fields").append( jQuery( ".pmpro_checkout-field-bcountry" ) );
jQuery("#pmpro_billing_address_fields>.pmpro_checkout-fields").append( jQuery( ".pmpro_checkout-field-bphone" ) );});
</script>
<?php
}
add_action( 'pmpro_checkout_after_billing_fields', 'my_pmpro_fix_billing_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment