gform_user_registration_meta_value

Description

This filter can be used to modify a value before it is saved to the user meta.

Usage

add_filter( 'gform_user_registration_meta_value', 'your_function_name', 10, 6 );

Parameters

Examples

The following example shows how you can override the the site address meta value.

add_filter( 'gform_user_registration_meta_value', function ( $value, $meta_key, $meta, $form, $entry, $is_username ) {
if ( $meta_key == 'siteAddress' ) {
$value = 'your new value';
}
return $value;
}, 10, 6 );

Placement

Your code snippet should be placed in the functions.php file of your active theme.

Since

This filter was added in version 3.0.

Source Code

$value = apply_filters( 'gform_user_registration_meta_value', $value, $meta_key, $meta, $form, $entry, $is_username );

This filter is located in GF_User_Registration::get_prepared_value() in class-gf-user-registration.php.