edd_email_templatesフィルターを使用すると、Easy Digital Downloads経由で送信されるメールに適用できる新しいメールテンプレート名を登録できます。
新しいテンプレートは、配列にキーと値のペアを追加することで登録できます。
function pw_edd_register_email_template( $templates ) {
$templates['my_custom_template'] = 'My Custom Template Name';
return $templates;
}
add_filter( 'edd_email_templates', 'pw_edd_register_email_template' );
テンプレートファイル自体は、wp-content/plugins/easy-digital-downloads/templates/emails/にあります。EDDは次のテンプレートを読み込もうとします。
- header-{template name}.php
- body-{template name}.php
- footer-{template name}.php
カスタムテンプレートは、現在アクティブなテーマ内のedd_templates/emailsという名前のフォルダに配置してください。
