How can we help?

Send an email notification to the organizer when a event listing is approved

It will be very helpful in communication strategies if you will send an email notification to organizers once their event listing is approved.

Following below steps will help you to Send an email notification to the organizer when a event listing is approved:

Send an email notification steps:

  1. Open your child theme.
  2. Add the below code to functions.php file:
    [code lang=”php”]
    <?php

    function send_email_notification_to_organizer($post_id) {
    $post = get_post($post_id);
    $author = get_userdata($post->post_author);

    $message = "
    Hi ".$author->display_name.",
    Your listing, ".$post->post_title." has just been approved at ".get_permalink( $post_id ).".
    ";
    wp_mail($author->user_email, "Your event listing got published!", $message);
    }
    add_action(‘publish_event_listing’, ‘send_email_notification_to_organizer’);

    ?>
    [/code]

  3. You can customize the message easily.

Use a plugin such as Post Status Notifier Lite.

Send an email notification to the organizer when a event listing is approved
Ashok Dudhat

Our team constantly explores ways that technology can help us reinvent industries. We want to change the world by creating great products that transform industries. We Dream It, We Make It.

Was this article helpful?
5 out Of 5 Stars
5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
How Can We Improve This Article?
Quick Links
Close
Close