WordPress at Your Fingertips
filter is not described

invited_user_email filter-hook . WP 5.6.0

Filters the contents of the email sent when an existing user is invited to join the site.


add_filter( 'invited_user_email', 'filter_function_name_1774', 10, 4 );
function filter_function_name_1774( $new_user_email, $user_id, $role, $newuser_key ){
	// filter...

	return $new_user_email;

Used to build wp_mail().

  • to(string)
    The email address of the invited user.

  • subject(string)
    The subject of the email.

  • message(string)
    The content of the email.

  • headers(string)
The invited user's ID.
Array containing role information for the invited user.
The key of the invitation.


Since 5.6.0 Introduced.

Where the hook is called

In file: /wp-admin/user-new.php
wp-admin/user-new.php 159
$new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key );

Where in WP core the hook is used WordPress

Usage not found.