Last active
January 27, 2024 14:19
-
-
Save kimwhite/b97e14273d1e4bf0179e6c79dc2e4752 to your computer and use it in GitHub Desktop.
This file contains 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 // do not copy this line. | |
/** | |
* This recipe does will move password fields on your PMPro checkout page | |
* | |
* 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 my_move_password_below_bemail() { | |
?> | |
<script> | |
jQuery(document).ready(function(){ | |
jQuery( '.pmpro_checkout-field-password' ).insertAfter( '.pmpro_checkout-field-bconfirmemail' ); | |
jQuery( '.pmpro_checkout-field-password2' ).insertAfter( '.pmpro_checkout-field-password' ); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'my_move_password_below_bemail' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment