Disable name change

Please add this code in your wp-content/plugins/wplms-customizer/wplms-customizer.php :

function bbg_disallow_name_edit( $has_profile ) {
global $profile_template, $bp;
 
if ( 'edit' != $bp->current_action || !bp_is_my_profile() )
return $has_profile;
 
foreach( (array)$profile_template->groups as $group_key => $group ) {
foreach( (array)$group->fields as $field_key => $field ) {
if ( $field->name == BP_XPROFILE_FULLNAME_FIELD_NAME ) {
unset( $profile_template->groups[$group_key]->fields[$field_key] );
$profile_template->groups[$group_key]->fields = array_values(
$profile_template->groups[$group_key]->fields );
break 2;
}
}
}
 
return $has_profile;
}
add_filter( 'bp_has_profile', 'bbg_disallow_name_edit' );