Can booking notification emails go to various addresses depending on event

WordPress Event Management, Calendars & Registration Forums Pre Sales Questions Can booking notification emails go to various addresses depending on event

This topic contains 2 replies, has 2 voices, and was last updated by  Stephen Harris 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36550 Reply

    we manage a training calendar that advertises courses by different trainers in various locations. is it possible to have booking “notification” emails sent to trainers email addresses when users book their courses from our calendar. So, Trainer A gets an email to inform them when people are booking their course(s) ?
    Or do all bookings get email notifications to the same address (by default WP admin) ?

    Ian Clarke
    #36551 Reply
    Ian Clarke
    #36581 Reply

    Hi Ian,

    Yes, it is with a bit of custom code:

    function my_booking_notification_email( $emails, $booking_id ){
          $event_id = eo_get_booking_meta( $booking_id, 'event_id');
          $notification_email = get_post_meta($event_id, 'notification_email');
          if ($email) {
              $emails[] = $notification_email;
          }
          return $emails;        
    }
    add_filter( 'eventorganiser_booking_notification_email', 'my_booking_notification_email', 10, 2 );
    

    This code looks for a custom field on the event named notification_email and adds it the list of emails to be notified (by default it would be just the site admin).

    You could replace $emails[] = $notification_email; with $emails = [$notification_email] to just notify that email (and not the site admin).

    And you could also replace

    $notification_email = get_post_meta($event_id, 'notification_email');
    

    with some other way of getting an email (e.g. getting it from the email attached to the event organiser).

    Stephen Harris
Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Can booking notification emails go to various addresses depending on event
Your information:




To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax


<a href="" title="" rel=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width=""> <p style=""> <span style="">