Description
Sends a WP-Members email (default or custom) to a user.
Parameters
$args
(mixed) (required) An array of arguments for the email, or the user ID as an integer if using legacy arguments.
$args = array(
'user_id' => $user_id,
'password' => $password,
'tag' => $tag,
'fields' => $fields,
)
$password
(string) This is the user’s plain text password (if being sent). Set to a null value if not sending as password.
$tag
(string) Indicates the email being sent (newreg|newmod|appmod|repass|getuser|custom|null).
$fields
(array) The registration data. Must be an array keyed by the field meta key.
$custom
(array) (optional) This is an array of the subject (“subj”), message body (“body”), and tag (“tag”) of the email.
Return Value
This function does not return a value.
Notes
This function replaces the legacy wpmem_inc_regemail()
function with a more flexible API function. The new function accepts individual arguments (outlined above) that were accepted by the previous function, so you can implement this function by only a name change. However, the preferred usage is to pass a single argument as an array. This will allow future compatibility if any additional parameters are added.
Changelog
Introduced in version 3.2.3
Source
wpmem_email_to_user() is located in /includes/api-email.php.