更新: このフィルターは現在非推奨です。カスタムメールタグを作成するには、こちらのサンプルコードスニペットを参照してください こちら
このフィルターを使用すると、購入レシートメールに追加のテンプレートタグを追加できます。
フィルターは2つのパラメーターを受け取ります:
- $message – メールコンテンツのHTML文字列
- $payment_data – 支払いに関するメタデータ配列
カスタムテンプレートタグは次のように追加できます:
function custom_edd_email_tags($message, $payment_data) {
$message = str_replace('{your_custom_tag}', 'replace the tag with this', $message);
return $message;
}
add_filter('edd_email_template_tags', 'custom_edd_email_tags', 10, 2);
