Making WordPress.org


Ignore:
Timestamp:
01/15/2019 11:02:54 AM (6 years ago)
Author:
vedjain
Message:

WCPT: Do not send notifications when Old and New status are same

We would have already notified when Meetup or WordCamp application would have been accepted for first time. So no need to do it again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

    r8083 r8084  
    725725            }
    726726
    727             if ( 'wcpt-scheduled' === $new_status ) {
     727            if ( 'wcpt-scheduled' === $new_status && 'wcpt-scheduled' !== $old_status ) {
    728728                return $this->notify_new_wordcamp_in_slack( $wordcamp );
    729             } elseif ( 'wcpt-rejected' === $new_status ) {
     729            } elseif ( 'wcpt-rejected' === $new_status && 'wcpt-rejected' !== $old_status ) {
    730730                $location = get_post_meta( $wordcamp->ID, 'Location', true );
    731731                return $this->schedule_decline_notification( $wordcamp, 'WordCamp', $location );
Note: See TracChangeset for help on using the changeset viewer.