Notification when event ended
-
Hi,
I was wondering if it’s possible to send user a notification when his/hers event has ended the same way admin get’s notifications about published events.I guess the right template is em-emails.php and by copying part of that I may be able to create my own filter and function in my functions.php?
Am I going to right direction with this? I need to find somehow if event has ended and then email the owner. This is not right and I probably need a different filter too, but maybe something like this?
function em_event_ended_email($result, $EM_Event){ if( $result ){ if( $EM_Event-> find out if event has ended? ){ if( $EM_Event->event_owner == "" ) return true; { $subject = $EM_Event->output('Event has ended', 'raw'); $body = $EM_Event->output(get_option('dbem_event_published_email_body'), $output_type); $EM_Event->email_send( $subject, $body, $EM_Event->get_contact()->user_email); } } } return $result; } add_filter('em_event_save','em_event_ended_email',10,2);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Notification when event ended’ is closed to new replies.