Skip to content

Instantly share code, notes, and snippets.

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 MaryOJob/a5fb8c1390335c6c0106132e8c1d3557 to your computer and use it in GitHub Desktop.
Save MaryOJob/a5fb8c1390335c6c0106132e8c1d3557 to your computer and use it in GitHub Desktop.
Move Payment Option fields under the Page Menu title on the Checkout Page
<?php // Do not copy this line
/**
* Add the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Move Payment Option fields
*/
function pmpro_move_level_options_fields() {
global $pmpro_pages;
if(is_page($pmpro_pages['checkout'])) {
?>
<script>
jQuery( '#pmpro_level_options' ).prependTo( '.pmpro_checkout-fields' ); // .pmpro_checkout-field-username
</script>
<?php
}
}
add_action( 'wp_footer', 'pmpro_move_level_options_fields' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment