Created
September 14, 2020 14:16
-
-
Save ronalfy/0a15b3fc355556ccbcf3f8f15014d60d to your computer and use it in GitHub Desktop.
PMPro - Move Pay by Check Field
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 | |
/** | |
* Moves the Pay by Check instructions below the payment options. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_checkout_check_field_move() { | |
if ( is_page( 'membership-checkout' ) && wp_script_is( 'jquery', 'done' ) ) { | |
?> | |
<script> | |
jQuery( document ).ready( function( $ ) { | |
$('.pmpro_check_instructions').appendTo( '#pmpro_payment_method tbody td div' ); | |
} ); | |
</script> | |
<?php | |
} | |
} | |
add_action( 'wp_footer', 'pmpro_checkout_check_field_move' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment