Hi there, I am trying to replicate the solution here with no luck:
I’ve added {transaction_id} and the form is set to “Payment Completed”
Do I still need to add this function?
add_filter('gform_replace_merge_tags', 'replace_transaction_id', 10, 7);
function replace_transaction_id($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format) {
$custom_merge_tag = '{txn_id}';
if(strpos($text, $custom_merge_tag) === false)
return $text;
$transaction_id = $lead["transaction_id"];
$text = str_replace($custom_merge_tag, $transaction_id, $text);
return $text;
}