#Overview
This filter lets you register meta fields in the wp_usermeta table that should always be synced whenever they are modified. This is helpful if you』re updating user data in your own code by using the functions add_user_meta() or update_user_meta().
To use the code examples below, add them to your active theme』s functions.php file.
#Parameters
$fields: An array of fields to watch
#Examples
#Watch a custom field and sync changes automatically
The example below will watch for changes in the field my_field_name and sync them.
function my_watch_meta_field( $fields ) {
$fields[] = 'my_field_name';
return $fields;
}
add_filter( 'wpf_watched_meta_fields', 'my_watch_meta_field' );
Keep in mind the field must still be associated with a field in your CRM via the Contact Fields tab in the WP Fusion settings.
#Was this helpful?
Let us know if you liked the post. That』s the only way we can improve.
Yes
No