Event booking mail – avoid two mails on free events

WordPress Event Management, Calendars & Registration Forums General Question Event booking mail – avoid two mails on free events

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 3 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38199

    I would like to send for free events only one confirmation mail to the admin. At the moment your plugins sends a “New Event Booking” and a “Confirmed Event Booking” mail. I didn’t find the right hook to change this behavior.

    What would be the best way to do so?

    Regards Valentin

    PS: @Stephen Harris sorry for cross posting, I sent you already an email on 08.06.

    Valentin Wittich
    #38208

    Hi Valentin,

    No worries. I replied to your email earlier, but I’ll post it here too.

    Currently you can configure which email notifications are sent in Settings > Event Organiser > Bookings. But this was apply to all events, not just free events.

    In a future release (3.1.0+) you’ll be able to configure email notifications on an individual booking basis as follows:


    add_filter('eventorganiser_notify_new_booking', function($send_new_booking_notification, $booking_id) { if( 0 == eo_get_booking_meta( $booking_id, 'booking_amount' ) ) { return false; } return $send_new_booking_notification; }, 10, 2);

    The above will disable ‘new booking’ notifications for free events. Non-free events will respect the setting in Settings > Event Organiser > Booking.

    Note: this code will only work once I’ve published Event Organiser Pro 3.1.0

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 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.