Hemann55 / medusa-plugin-mailjet

Mailjet Plugin for Medusa to send transactional emails.
7 stars 4 forks source link

Variables: undefined #3

Closed tsvetann closed 11 months ago

tsvetann commented 1 year ago

When I test a new user creation first I get: info: Processing customer.created which has 0 subscribers

But it seems to actually trigger the mailjet plugin which however gives me: Variables: undefined. How do I get the first and last name?

tsvetann commented 1 year ago

I think you have a bug here:

nonNull = Object.keys(dynamic_template_data).forEach(function (key) { if (dynamic_template_data[key] === null) { delete dynamic_template_data[key]; } });

forEach always returns undefined. Please refer to the docs:

Hemann55 commented 12 months ago

Fixed it. Let me know if it works for you

tsvetann commented 12 months ago

Now after upgrading I get the following: Processing customer.created which has 0 subscribers

Hemann55 commented 11 months ago

Are variables (first and last names) being sent correctly?

tsvetann commented 11 months ago

It is. thanks for fixing it