Forked from ronalfy/pmpro-move-company-bililng.php
Last active
September 10, 2021 15:27
-
-
Save kimwhite/1e329193ae2d7a85d6f6ae3b332d6ffb to your computer and use it in GitHub Desktop.
Paid Memberships Pro - Move custom Field to Billing
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 | |
/** | |
* Move custom date field above address 1 line. | |
*/ | |
function pmpro_move_custom_to_billing() { | |
if ( is_page( 'membership-checkout' ) && wp_script_is( 'jquery', 'done' ) ) { | |
?> | |
<script> | |
jQuery( '#date_of_birth_div' ).prependTo( '.pmpro_checkout-field-baddress1' ); | |
</script> | |
<?php | |
} | |
} | |
add_action( 'wp_footer', 'pmpro_move_custom_to_billing' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment