このフィルターは、ダウンロードを購入した後にユーザーに送信される購入レシートメールを変更するために使用できます。
フィルターは3つのパラメーターを受け入れます:
- $message – メール本文を含むHTML文字列
- $payment_id – 購入の数値ID
- $payment_data – 支払いメタデータの配列
購入レシートに追加情報を追加する方法の例を以下に示します:
function add_to_purchase_receipt($message, $payment_id, $purchase_data) {
// add custom text to the end of the receipt
$message .= "nnThis is custom text added to the end of the purchase receipt";
return $message;
}
add_filter('edd_purchase_receipt', 'add_to_purchase_receipt', 10, 3);
