insert_user_meta

insert_user_meta

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('insert_user_meta') is found 1 times:

  • /wp-includes/user.php line 2460
    	 * @param WP_User $user     User object.
    	 * @param bool    $update   Whether the user is being updated rather than created.
    	 * @param array   $userdata The raw array of data passed to wp_insert_user().
    	 */
    	$meta = apply_filters( 'insert_user_meta', $meta, $user, $update, $userdata );
    
    	$custom_meta = array();
    	if ( array_key_exists( 'meta_input', $userdata ) && is_array( $userdata['meta_input'] ) && ! empty( $userdata['meta_input'] ) ) {
    		$custom_meta = $userdata['meta_input'];
    	}
    
    

See this hook used in plugins: