-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email notifications #232
Email notifications #232
Conversation
…e_event_meta_boxes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some ideas to improve the e-mail text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work @amieiro! I really like the separation into Notifications_Schedule
and Notifications_Send
, makes things very easy to understand.
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
Co-authored-by: Alex Kirk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, sorry for the false alarm of something not implemented. It looks good now! I thought we had said we'd wanted to show how many other people are also attending the event but we can do that in a follow-up PR. Good to get this one merged.
This PR adds email notifications to all the attendees of an event around 1 hour and 1 day before the event.
To test this PR, I recommend you this configuration:
To test this PR, you can:
Create an event. In this example, I created an event for the May month. As I am locally work in CEST timezone (UTC+2) and the form is using UTC, I need to start on 2024-04-30 22:00 (2024-05-01 00:00 UTC time) and finish on 2024-05-31 21:59 (2024-05-31 23:59 UTC time).
Once I published the event, with the WP Crontrol plugin I can see the custom cron events (in CEST timezone):
You can see in the notifications:
post_id
(event_id) as parameter.Wporg\TranslationEvents\Notifications\Notifications_Send->send_notifications()
as the action that will be executed when this event will be fired.Each time I modified the event, all these custom cron events are deleted and re-scheduled, to use the new start time.
To fire one of these events manually, you can use the
Run now
link, available in each custom cron event.Once the custom cron event is fired, you will receive an email like this:
Fixes #168.