Messages System: Message Templates
Message Templates are the blueprint for what the message will look like when its assembled. This is a very powerful component to the messages system because it allows for more granular control of the “looks” of outgoing messages.
The important thing to remember about message templates, is that there is a message template for each messenger, message type, and context combination. So for example, there is a template for the email messenger, registration approved message type, and Event Admin recipient (context).
Each message template will have fields that are defined by the messenger primarily but also supplemented by the message type if there are any additional fields required by the message type. For instance, all email templates will have to, from, subject and main content fields.
Event Espresso Message Templates
- Registration Approved: Sent when a registration is approved.
- Registration Pending Payment: Sent when a registration is pending payment.
- Registration Declined: Sent when a registration is declined.
- Registration Cancelled: Sent when a registration is canceled by the attendee or admin.
- Payment Received: Sent when a payment is successfully processed for a registration.
- Payment Declined: Sent when a payment fails or is declined.
- Payment Reminder: Sent as a reminder for payments that are due.
- Event Admin Notification: Notifies the event admin of new registrations or changes to existing ones.
- Ticket Notice: Provides attendees with their ticket and event details after registration.
- Refund Issued: Sent when a refund is processed for a registration.
- Attendee Batch Report: Sent to event admins with a batch report of all event attendees.
- Wait List Registration: Sent when a person joins the waitlist for a sold-out event.
- Wait List Confirmation: Sent when an attendee from the waitlist is confirmed for the event.
- Invoice: Sent to attendees when an invoice is generated for their registration.
- Receipt: Sent as a receipt after successful payment processing.
When you activate Event Espresso, the message system comes with default global templates out of the box that will help you get started right away with your events without having to do any editing. However you are able to edit any of these templates.
Difference between Global and Event specific templates
One more powerful feature with the new messages system is that by default, global templates will apply to every trigger happening with an event. So that means, for example, when a registration is approved (the trigger), all the global templates using the Registration Approved message type get sent. However, the messages system also allows Event Authors to create a custom template for that message type to be used only for that event. If this is done, then when the Registration Approved message type is triggered the message template for that event is used instead of the global message template. This allows you to differentiate different automatic messages for different events.
Customizations
- Enqueue your own styles or scripts via this hook (and just add the regular wp_enqueue_style() etc in your function):
AHEE__EE_Html_messenger__enqueue_scripts_styles
That should load any CSS scripts/styles AFTER the messages styles/scripts. - Learn about Registering a Messages Template Variation