push_user_meta()

Overview

This function allows you to sync WordPress user metadata to fields in your CRM.

Sending specific data

You can send specific fields by providing an array of field names and values.

$update_data = array(
	'first_name'   => 'Joe'
	'custom_field' => 'Custom Value'
)

wp_fusion()->user->push_user_meta( $user_id, $update_data );

The field keys should be WordPress meta fields keys. WP Fusion will use the field mapping you’ve set on the Contact Fields tab to associate the data with the corresponding fields in your CRM.

Sending all user data

You can also omit the array of update data, and WP Fusion will get all of the information it can find about the user from the database and send it to your CRM.

wp_fusion()->user->push_user_meta( $user_id );