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-meetup/class-meetup-admin.php

    r8083 r8084  
    498498            }
    499499
    500             if ( 'wcpt-mtp-active' === $new_status ) {
     500            if ( 'wcpt-mtp-active' === $new_status && 'wcpt-mtp-active' !== $old_status ) {
    501501                return $this->notify_new_meetup_group_in_slack( $meetup );
    502             } elseif ( 'wcpt-mtp-rejected' === $new_status ) {
     502            } elseif ( 'wcpt-mtp-rejected' === $new_status && 'wcpt-mtp-rejected' !== $old_status ) {
    503503                $location = get_post_meta( $meetup->ID, 'Meetup Location', true );
    504504                return $this->schedule_decline_notification( $meetup, $this->get_event_label(), $location );
Note: See TracChangeset for help on using the changeset viewer.