Hi @makmerghen
1. When you add the choices callback, it will automatically add the choices in the options. Leave it as is and then save the field. Add the default value in the field settings if you must have it.
2. What happens when you add Arabic instead of ar? Does it select the default value when you edit the profile?
Regards,
Dear @champsupertramp
I added Arabic instead of ar and I got same result no default value
best regards
Hi @makmerghen
If a profile is already saved, it won’t have a default value. Have you tried creating a new profile and then checking the profile if it has a default value after the registration?
Regards,
Dear @champsupertramp
I did Arabic as default language in form setting
and
I created user without choose any language the result that the user was created without choose any language in wp edit user page
but when I select Arabic in UM register form the created user got Arabic language
best regards
Hi @makmerghen
The default value for UM Profile/Register form only works within the UM. If you’re registering a user via WP Admin > Users, it won’t set any locale. You can try the following code snippet to add a default locale value for the registered user.
add_action("user_register","um_011022_add_default_locale");
function um_011022_add_default_locale( $user_id ){
update_user_meta( $user_id, "locale", "ar");
}
Regards,
okay Dear @champsupertramp thank you I will not use the callback since using the normal way give the right result
thanks very much for helping
Hi @makmerghen
Thanks for letting us know.
Regards,