Skip to content

Commit 353d848

Browse files
authored
Only send Update for previously-published posts (#833)
1 parent e6040f5 commit 353d848

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

includes/class-scheduler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ public static function schedule_post_activity( $new_status, $old_status, $post )
142142
$type = 'Create';
143143
} elseif (
144144
'publish' === $new_status ||
145+
// We want to send updates for posts that are published and then moved to draft.
145146
( 'draft' === $new_status &&
146-
'draft' !== $old_status )
147+
'publish' === $old_status )
147148
) {
148149
$type = 'Update';
149150
} elseif ( 'trash' === $new_status ) {

0 commit comments

Comments
 (0)