Trying to set up auto-subscribe user groups for particular authors. Specifically, when a Contributor changes a post status from Draft to Pending Review, the user group with that Contributor's editor is auto-subscribed. Using the auto-subscribe mini framework, but this isn't working (no notification send to user group when post changed from Draft to Pending Review):
if ( 'pending' == $new_status && '306' == $post->post_author ) {
$usergroup_ids_to_follow = array(
21,
);
What's the correct conditional statement?