# Email Alert for Events Awaiting Review

> Emails your events editor whenever an event is submitted for review (for example through Community Events or by a contributor), with a direct link to approve it.

- Type: PHP
- Runs: Run everywhere
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: events-calendar, moderation, email
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/tec-pending-event-alert/

## Code

```php
$wpide_editor_email = get_option( 'admin_email' ); // Recipient.

add_action( 'transition_post_status', function ( $new, $old, $post ) use ( $wpide_editor_email ) {
    if ( 'tribe_events' !== $post->post_type || 'pending' !== $new || 'pending' === $old ) {
        return;
    }

    $start = get_post_meta( $post->ID, '_EventStartDate', true );

    wp_mail(
        $wpide_editor_email,
        sprintf( '[%s] Event awaiting review: %s', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ), $post->post_title ),
        sprintf(
            "A new event is waiting for review.\n\nTitle: %1\$s\nStarts: %2\$s\nReview: %3\$s\n",
            $post->post_title,
            $start ? $start : 'not set',
            admin_url( 'post.php?post=' . $post->ID . '&action=edit' )
        )
    );
}, 10, 3 );
```

## Notes

Set $wpide_editor_email; it defaults to the site admin email.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Email Alert for Events Awaiting Review" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
