Skip to content

[DevHub] Add missing return scenario to get_user_meta() #2293

@crstauf

Description

@crstauf

Reported by islp via User Contributed Notes.

Issue Description

The docs lack one scenario:

mixed

  1. An array of values if $single is false.
  2. The value of meta data field if $single is true.
  3. False for an invalid $user_id (non-numeric, zero, or negative value).
  4. An empty string if a valid but non-existing user ID is passed.

What if the user ID is ok and the meta field doesn’t exist?

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/get_user_meta/#return

Section of Page with the issue

Return

Why is this a problem?

Does not include a possible scenario.

Suggested Fix

Adjust the return section to include the described scenario.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions