Last active
June 19, 2020 17:07
-
-
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
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
<?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