Email notification by event (or booking form)

WordPress Event Management, Calendars & Registration Forums Request A Feature Email notification by event (or booking form)

This topic contains 3 replies, has 3 voices, and was last updated by  Stephen Harris 8 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9646

    Hi Stephen,

    One of my clients would like to be able to set separate booking notification addresses by event (or at the very least, by booking form). This is because they have a number of different event organisers who would like to receive notifications.

    Hope that makes sense…

    Andrew

    Andrew Shankie
    #9648

    I think in 1.7 there’ll be an option to “notify the event organiser” instead of / as well as the site’s admin. But assuming the user to be notified is the ‘event organiser’ then you can do that with the code in this thread on changing the notification emails.

    If not, you can alter that code to the do the following:

    add_filter( 'eventorganiser_booking_notification_email', 'my_booking_notification_email', 10, 2 );
    function my_booking_notification_email( $emails, $booking_id ){
    
          //Get the event ID and organiser ID
          $event_id = eo_get_booking_meta( $booking_id, 'event_id' );
          $notify = get_post_meta( $event_id, 'notify_emails' );
    
          //If emails to be notified is present, use that, otherwise fall back to $emails
          $emails = $notify ? $notify : $emails;
    
          return $emails;        
    }

    And then just use the custom fields metabox for the event to specify e-mail addresses to be notified, using the key notify_emails

    Stephen Harris
    #21088

    Is this technique compatible with the ‘Event Organiser Booking Notification Settings’ plugin? Or, should that be disabled in favor of this?

    Alan Caplan
    #21094

    Hi Alan,

    The Booking Notification Settings plug-in allows you to add specific e-mail addresses to including in the notifications, as well as notifying the event organiser. So if that plug-in does what you require, you should definitely use that.

    This snippet allows you to specify the e-mails to be notified on an event-by-event basis, but it’s the event organiser (author) you may as well use the plug-in. This snippet would be useful for anything more complicated.

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.