#Overview
This filter lets you register custom meta fields to show up in the Contact Fields list. From there you can map them to a field in your CRM, and sync data either manually using push_user_meta()
or automatically by registering the field using wpf_watched_meta_fields
.
To use the code examples below, add them to your active theme’s functions.php file.
#Parameters
$fields
: An array of fields to add
#Examples
The example below will add a new field for sync with key primary_membership
.
function add_custom_meta_field( $meta_fields ) {
$meta_fields['primary_membership'] = array(
'label' => 'Membership',
'type' => 'text',
'group' => 'wordpress',
);
return $meta_fields;
}
add_filter( 'wpf_meta_fields', 'add_custom_meta_field' );
Was this helpful?
Let us know if you liked the post. That’s the only way we can improve.