-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hello,
One of the problems I found with original plugin's docs, is the statement regarding sending emails for custom events. By reading the docs, one would assume that just by adding the custom event template key to plugin options, and corresponding template Sendgrid id as value, emails would be sent.
This alone won't fire an email, since the event is never registered against the NotificationProvider. I would suggest two alternatives:
1- Either change the README, indicating that apart from setting this configuration in plugin options, one needs to create a Subscriber and register the event against the Sendgrid provider, similar to order loader
2- Or change the loader code, to dynamically register the events taken from the plugiun options, against the sendgrid provider. This way, firing emails for custom events is as easy as firing them for the already defined ones, since you just add the config to plugin options and don't need to worry about creating the loader.