Confirmation emails

This topic contains 3 replies, has 2 voices, and was last updated by  Squirrelhouse 4 months, 1 week ago.

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

    Hi Stephen,

    A couple of questions please:-

    1. Plugin confirmation emails are being sent from the WordPress Administration Email Address. How may I change this to a different email address?
    2. I’d like to attach a PDF to confirmed bookings. How would I do that please?



    Hi David,

    Details on how to change the sender of the confirmation emails can be found here:

    In particular, the following code would allow you to change the email that confirmation emails are sent from, and which email is notified of a new/confirmed bookings:

    function my_event_admin_email( $email ){
          //Change $email;
          return $email;        
    add_filter( 'eventorganiser_admin_email', 'my_event_admin_email' );

    As for attaching PDFs there is no feature provided for this, however, I have open sourced this plug-in which generates and attaches PDF tickets which you could re-purpose:

    It comes with the health warning that this is code that hasn’t been looked at it or used in years. The recent commits were only to remove some comment-ed out code.

    However, if you don’t want to generate PDFs on the fly and instead just attach a static PDF, it’s much simpler and you won’t need to the above extension.

     add_filter('eventorganiser_booking_confirmed_email_attachments', function($attachments, $booking_id ) {
         $attachments[] = WP_CONTENT_DIR . '/path/to/file.pdf';
         return $attachments;
     }, 10, 2);
    Stephen Harris

    Hi Stephen, Many thanks for these. For the PDF, it is a static PDF so something based on your code should work well. It is a different PDF depending on the Event Category slug so would this look to be about right within the filter :-

    if ($event-category == 'efaw') {$attachments[] = WP_CONTENT_DIR . '/path/to/EFAW.pdf';
    } elseif ($event-category == 'faw') {$attachments[] = WP_CONTENT_DIR . '/path/to/FAW.pdf';
    } elseif ($event-category == 'fawr') {$attachments[] = WP_CONTENT_DIR . '/path/to/FAWR.pdf';
    } else { }
    return $attachments;

    • This reply was modified 4 months, 1 week ago by  Squirrelhouse.
    • This reply was modified 4 months, 1 week ago by  Squirrelhouse.

    Sorry about the abortive attempts above to provide the code but I can confirm it works fine 🙂
    Many thanks

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.