formcierge_merge_tag_context
Filter
Since v1.0.0
Add extra data to the context object passed to merge tag resolution. Allows custom merge tags to access any data you inject here.
Parameters
$context
array
Context array with at minimum entry_id and form_id keys.
$form_id
int
The form ID.
$entry_id
int
The entry ID.
includes/Core/MergeTagRegistry.php
Basic Usage
add_filter( 'formcierge_merge_tag_context', function ( $context, $form_id, $entry_id ) {
$context['crm_contact_id'] = my_crm_get_contact( $entry_id );
return $context;
}, 10, 3 );