Posted: February 8, 2024 at 9:47 am
Hi, We’re using https://eventespresso.com/wiki/eea-automated-upcoming-event-notifications/ and it’s generally working well. We want to create a custom template for a major event, including QR codes for registrants. I’m happy creating the email and using the merge fields to create the content inc QR code – but I want to test it first. The “send test message option” only works in the context of a test registrant (Luke Skywalker). How can I test the template in the context of a real registrant ahead of time? Our event hosting company want to see examples of the emails in advance to test their check-in system. (I know I could duplicate the event, and use the new template there. But as the email is automated, I’d have to wait a whole day between each test, which is not practical). I’m happy to use code on a dev site to trigger the emails if that’s an easier option. Thanks |
|
Hi there, So, currently, the only ‘proper’ method to get test data from an event is to use an actual event to trigger the emails. You can force the message previews to use live event data (event name, datetimes etc) but not registrant data. Which specific message are you using within the AUEN add-on? (I’ll check for the values it is checking in the DB which should then allow you to trigger the messages just by manipulating those values and triggering the cron task for the add-on on a test event) |
|
Thanks Tony. We’re using the Automated Upcoming Event Notification (i.e. not Date Time). In the meantime I found a workaround: – Use a development copy of the site It would still be useful to know how to trigger the AUEN emails manually via the DB/code. Thanks |
|
Nice workaround 🙂 Here is an example of removing the extra meta row used to store if a notifications has been triggered:
For your use case, you can shorten all of that down to just:
Having the EVT_ID separate obviously isn’t required but personally I think it helps when using the code multiple times, set the ID, run, set the ID to the new ID, run and so on. With the above value remove from the database, you just run the cron again to trigger notifications. Use something like WP Crontrol and go to Tools -> Cron Events. Find the ‘AHEE__EventEspresso_AutomatedEventNotifications_core_tasks_Scheduler__check’ taks and hit run now. The notification will trigger again and a new extra meta value saved, delete it using the same code you ran above and the next time you run the cron it will retrigger, repeat for as many tests as you want. |
|
Very helpful to know; thank you! |
|
The support post ‘Previewing messages with live merge data’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.