Created
October 21, 2020 14:41
-
-
Save gausam/6244e85720ab6cd23da5a5be24022dd1 to your computer and use it in GitHub Desktop.
Change the order of fields on the on the Member Profile Edit page.
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 | |
/** | |
* This recipe changes the order of fields on the on the Member Profile Edit 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 mypmpro_member_profile_edit_user_object_fields($fields) { | |
$fields = array( | |
'user_email' => __( 'Email', 'paid-memberships-pro' ), | |
'display_name' => __( 'Display name publicly as', 'paid-memberships-pro' ), | |
'last_name' => __( 'Last Name', 'paid-memberships-pro' ), | |
'first_name' => __( 'First Name', 'paid-memberships-pro' ), | |
); | |
return $fields; | |
} | |
add_filter('pmpro_member_profile_edit_user_object_fields', 'mypmpro_member_profile_edit_user_object_fields'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment