• Resolved baksus

    (@baksus)


    Hi everyone
    I have created a custom registration form and one of the hidden fields is locale.
    When I add a user to DB I add:
    add_user_meta($user_id, "user_locale", $locale, false);

    This creates a record in wp_usermeta table.
    So far so good. The problem is when I look at the new user in wp admin dashboard the language is not set (its just the first option in the dropdown). If I alter the user (approve, deny,..) that first option is updated in the DB. Do I need to set anything else? What am I missing?
    BR, Igor

    WP version 4.9.4

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter baksus

    (@baksus)

    Nevermind. I found the problem. Wrong string was being saved and I failed to see the difference. sl-SI != sl_SI.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom registration form setting user locale’ is closed to new replies.