Filter hook 'send_email_change_email'

in WP Core File wp-includes/user.php at line 2704

View Source

send_email_change_email

Filter Hook
Description
Filters whether to send the email change email.

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 2704

Hook Parameters

Type Name Description
bool $send Whether to send the email.
array $user The original user array.
array $userdata The updated user array.

Usage Examples

Basic Usage
<?php
// Hook into send_email_change_email
add_filter('send_email_change_email', 'my_custom_filter', 10, 3);

function my_custom_filter($send, $user, $userdata) {
    // Your custom filtering logic here
    return $send;
}

Source Code Context

wp-includes/user.php:2704 - How this hook is used in WordPress core
<?php
2699  		 *
2700  		 * @param bool  $send     Whether to send the email.
2701  		 * @param array $user     The original user array.
2702  		 * @param array $userdata The updated user array.
2703  		 */
2704  		$send_email_change_email = apply_filters( 'send_email_change_email', true, $user, $userdata );
2705  	}
2706  
2707  	clean_user_cache( $user_obj );
2708  
2709  	// Merge old and new fields with new fields overwriting old ones.

PHP Documentation

<?php
/**
		 * Filters whether to send the email change email.
		 *
		 * @since 4.3.0
		 *
		 * @see wp_insert_user() For `$user` and `$userdata` fields.
		 *
		 * @param bool  $send     Whether to send the email.
		 * @param array $user     The original user array.
		 * @param array $userdata The updated user array.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.