Set user meta
wp_update_user_metaCreate or overwrite one user meta value (all stored values of the key are replaced). Refused: keys starting with "_", role and capability keys of any site (…capabilities, …user_level), session_tokens, default_password_nonce, use_ssl and credential-like keys; role and password are changed by wp_update_user. Needs edit_users, the right to edit this user and to edit this key; an unknown user is a not-found error. WordPress strips backslashes from the value. Returns updated, user_id and key. No undo point is recorded; wp_get_user_meta reads the value. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Meta key; stored lower-cased with characters other than a-z, 0-9, "_" and "-" removed (sanitize_key). | |
| value | No | Scalar or array of scalars (arrays may nest); an array is stored serialized. Omitted: an empty string. | |
| user_id | Yes | User id, as wp_list_users returns it. |