1

管理者に重力形式で送信される通知メールにトランザクションIDを挿入するためのサポートが必要です。

4

1 に答える 1

2

これをテーマの functions.php ファイルに追加する必要があります。

add_filter( 'gform_replace_merge_tags', 'replace_transaction_id', 10, 7 );
function replace_transaction_id( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
    $transaction_id = empty( $transaction_id ) ? rgar( $entry, 'transaction_id' ) : $transaction_id;
    $text = str_replace( '{transaction_id}', $transaction_id, $text );
    return $text;
}

次に、次のマージ タグを Gravity Forms 通知領域に追加できます。

{transaction_id}

あなたの質問からかなり時間が経っていますが、Googleでこの回答を検索してこのページにたどり着き、最終的に回答を追跡したので、ここで共有しています。

于 2015-03-18T21:24:31.573 に答える