This PHP code added function to Wordpress for Username can be write in Arabic


    add_filter('sanitize_user', static function ($username, $rawUserName, $strict) {
if (!$strict) {
return $username;
}

return sanitize_user(stripslashes($rawUserName), false);
}, 10, 3);


 


Please use this code in your Child Theme functions.php . You can read more about Child Themes here: 


How to use Child Theme? How to change files (php / css / js) and keep theme future update compatibility? 


 


Open theme editor in your Wp-Admin (make sure you have selected MyHome Child to edit)



 


3. Paste this code at the bottom on file functions.php


4. After this change your user can register username in Arabic alphabet.