Created
March 3, 2021 17:58
-
-
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.
This file contains hidden or 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 | |
// 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