Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Forked from ronalfy/pmpro-move-company-bililng.php
Last active September 10, 2021 15:27
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 kimwhite/1e329193ae2d7a85d6f6ae3b332d6ffb to your computer and use it in GitHub Desktop.
Save kimwhite/1e329193ae2d7a85d6f6ae3b332d6ffb to your computer and use it in GitHub Desktop.
Paid Memberships Pro - Move custom Field to Billing
<?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