Can you intercept an event when an invoice email is generated or before it is sent?

Isaiah Justman asked on November 10, 2022 19:32

I am working on a feature for our store, in which we want to dynamically add CC recipients to the invoice email that is generated after checking out. I've reviewed the global events available here:

https://docs.xperience.io/custom-development/handling-global-events/reference-global-system-events#ReferenceGlobalsystemevents-EcommerceEvents

but don't see anything that seems to fit what I am looking for. Is what I am trying to do even possible?

I can add more information or answer questions to clarify if needed.

Recent Answers


Irene Gunning answered on November 15, 2022 05:33

You can edit the email template under the Email templates application in the admin interface then select (global) in the Site dropdown.

I'm guessing you want to change the E-commerce - Order payment notification to customer or E-commerce - Order payment notification to administrator email template?

0 votesVote for this answer Mark as a Correct answer

Isaiah Justman answered on November 16, 2022 17:53

So, I think I didn't phrase my question correctly. I am aware of how to edit the email templates. What I am asking, is if it is possible to programmatically add CC recipients to the email?

My thought is that I would need to intercept an event and do it then. Unless there is a different way of doing it. Or it isn't possible?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.