send event organizer an email after event submission

Home Forums Calendar Products Community Events send event organizer an email after event submission

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #988592
    Tony Ash
    Participant

    Hello. I have ECP with the Community Add On and I have it configured with “Allow anonymous submissions”.

    Is there a way to send an email to an organizer after they’ve submitted an event? I’ve been able to customize the confirmation message using the insructions here:
    http://tri.be/support/forums/topic/customize-submit-event-form-fields-thank-you-email-notice/
    https://gist.github.com/caseypatrickdriscoll/c958ff287672bc70cd0c

    Now I’d like to send an email to the Event Organizer after they’ve submitted an event.

    How might I go about doing this?

    Thanks for your help!

    #988703
    Nico
    Member

    Hi Tony,

    Thanks for reaching out to us. I’ll be glad to help you out with this!

    Adding this snippet to your functions.php file (located at ‘wp-content/themes/your_theme/’) should do the trick:


    add_action( 'tribe_community_event_created', 'notify_organizer' );

    function notify_organizer ( $event_id ) {
    $email = tribe_get_organizer_email( $event_id );

    if( !empty($email) ) {
    $subject = 'Hey Organizer';
    $message = 'Just wanted to let you now about a new event!';

    wp_mail( $email, $subject, $message );
    }
    }

    Please try it out and let me know,
    Best,
    Nico

    #993388
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘send event organizer an email after event submission’ is closed to new replies.