Function: wp_validate_user_request_key

wp_validate_user_request_key( string $request_id, string $key )

Validate a user request by comparing the key with the request's key.

Parameters

Name Type(s) Default Value Description
$request_id string

ID of the request being confirmed.

$key string

Provided key to validate.

Returns

boolean | WP_Error

WP_Error on failure, true on success.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.