How to disable phone number and email fields in user account setting so user can not edit his phone and email
Sorry for the delay. Please try this PHP snippet but please note that it can require further customization
add_filter(
'hivepress/v1/forms/user_update',
function($form_args, $form){
if(isset($form_args['fields']['email'])){
$form_args['fields']['email']['readonly'] = true;
}
if(isset($form_args['fields']['phone'])){
$form_args['fields']['phone']['readonly'] = true;
}
return $form_args;
},
1000,
2
);
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.