Filter: um_before_update_profile

apply_filters( 'um_before_update_profile', $changes, $user_id ) → {array}

Filters the update profile changes data.

Parameters:
Name Type Description
$changes array

User Profile Changes.

$user_id int

User ID.

Since:
  • 1.3.x
Source:
Returns:

User Profile Changes.

Type
array
Example

Remove some_metakey from changes where user ID equals 12.

function my_custom_before_update_profile( $changes, $user_id ) {
    if ( 12 === $user_id ) {
        unset( $changes['{some_metakey}'];
    }
    return $changes;
}
add_filter( 'um_before_update_profile', 'my_custom_before_update_profile', 10, 2 );