Closes #2242
@@ -24,7 +24,7 @@ and return the template as a string.
import { EmailPlugin, TemplateLoader } from '@vendure/email-plugin';
class MyTemplateLoader implements TemplateLoader {
- loadTemplate(injector, ctx, { type, templateName }){
+ loadTemplate(injector, ctx, { type, templateName, templateVars }){
return myCustomTemplateFunction(ctx);
}
@@ -81,6 +81,7 @@ export class EmailProcessor {
{
templateName: data.templateFile,
type: data.type,
+ templateVars: data.templateVars,
},
);
const generated = this.generator.generate(data.from, data.subject, bodySource, data.templateVars);
@@ -354,6 +354,7 @@ export interface EmailTemplateConfig {
export interface LoadTemplateInput {
type: string;
templateName: string;
+ templateVars: any;
export interface Partial {