Forked from ipokkel/my_pmproan2c_change_priority.php
Last active
June 1, 2022 07:35
-
-
Save MaryOJob/48fc1a5660265684c26e1dfd60958d8a to your computer and use it in GitHub Desktop.
Reorder the PMPro "Add First and Last Name (add-on)" field setting it to display after the username 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 // Do not copy this line | |
/* Load add name to checkout (pmproan2c) earlier than default | |
* Can be used to reposition name fields when multiple custom fields are | |
* loaded after the username field on the checkout page | |
* Add this code to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmproan2c_change_priority() { | |
remove_action( 'pmpro_checkout_after_password', 'pmproan2c_pmpro_checkout_after_password' ); | |
add_action( 'pmpro_checkout_after_username', 'pmproan2c_pmpro_checkout_after_password' ); | |
} | |
add_action( 'init', 'my_pmproan2c_change_priority' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment