Advertisement
chrishajer

transaction_id merge tag

Oct 14th, 2014
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. // add a {transaction_id} merge tag
  2. add_filter( 'gform_replace_merge_tags', 'replace_transaction_id', 10, 7 );
  3. function replace_transaction_id( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
  4.     GFCommon::log_debug( "gform_replace_merge_tags(): \$entry => " . print_r( $entry, true ) );
  5.     $text = str_replace( '{transaction_id}', $entry['transaction_id'], $text );
  6.     return $text;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement