Is it possible to send different confirmation mails depending on event category

WordPress Event Management, Calendars & Registration Forums General Question Is it possible to send different confirmation mails depending on event category

This topic contains 4 replies, has 3 voices, and was last updated by  Stephen Harris 9 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17879

    We actually only have two different courses at the moment and offer theme regularly, always at the same venue.
    Depending on which one a client registers to, I want to send a complete different email.

    In both cases there is something like “thank you for registering to the course %event_title% on %event_date% at %event_starttime%
    The course will be held at %event_venue% bla bla….

    And then comes a totally different block depending on the course category

    Is is possible to accomplish this, maybe with including a dynamically called text or a custom field or something.

    Christian Zumbrunnen
    #17882

    There’s no UI for this, but it is possible to change the booking confirmation e-mail dynamically:

    add_filter( 'eventorganiser_booking_confirmed_email_body', 'my_booking_confirmation_email', 10, 2 );
    function my_booking_confirmation_email( $message, $booking_id ){
    
         $event_id = eo_get_booking_meta( $booking_id, 'event_id' );
         //$event_id is the (post) ID of the event
    
         //$message is the HTML mark-up of the e-mail.
         //Alter $message based on event category. 
    
         return $message;
    
    }
    

    What you could do is use a custom placeholder, and then use str_replace() to replace it with a dynamic block of text. From version 1.11.0 they’ll be an API for registering custom e-mail placeholders, so you won’t need to use the str_replace() method.

    Stephen Harris
    #18619

    Hi,

    I need exactly the same fonctionality …
    the possibility to send different emails for events by category.

    I read the your answer above but i did not understand how you apply it.
    Could you be a bit more precise for non-dev people?

    Thank’s

    Vincent

    Vincent
    #18620

    … OOPS sorry… i found a clearer answer here:

    http://wp-event-organiser.com/forums/topic/customise-email-depending-on-event-category/

    I got it and understood the “utility plug-in ” concept…

    Anyway… still thank’s for your job

    Best

    Vincent

    • This reply was modified 9 years, 6 months ago by  Vincent.
    Vincent
    #18631
    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 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.