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.
$password
(string) If using legacy arguments, this is the user’s plain text password (if being sent). Set to a null value if not sending, or omit entirely if sending $args as an array.
$tag
(string) If using legacy arguments, this indicates the email being sent (newreg|newmod|appmod|repass|getuser|custom|null).
$wpmem_fields
(array) If using legacy arguments, an array of the WP-Members fields.
$field_data
(array) If using legacy arguments, an array of the registration data.
$custom
(string) If using legacy arguments, 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.
Examples
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.