Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Created March 3, 2021 17:58
Show Gist options
  • Save dparker1005/9481dbd1a671298b4c14593e3693e519 to your computer and use it in GitHub Desktop.
Save dparker1005/9481dbd1a671298b4c14593e3693e519 to your computer and use it in GitHub Desktop.
Move billing address fields to after a specified PMPro checkout box at checkout.
<?php
// Copy from below here...
/*
* Move billing address fields to after a specified PMPro checkout box at checkout.
*/
function my_pmpro_move_billing_fields() {
global $pmpro_pages;
if(is_page($pmpro_pages['checkout'])) {
?>
<script>
jQuery( '#pmpro_billing_address_fields' ).appendTo( '#pmpro_checkout_box-personal' );
</script>
<?php
}
}
add_action( 'wp_footer', 'my_pmpro_move_billing_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment