Support » Plugin: Edit Flow » [Plugin: Edit Flow] Auto-subscribe user groups for specific authors

  • 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(

    What’s the correct conditional statement?

Viewing 1 replies (of 1 total)
  • Plugin Author Daniel Bachhuber


    Hand Built

    When you say “this isn’t working”, do you mean:

    • The usergroup isn’t subscribed at all
    • The user group becomes subscribed, but the email notification isn’t sent

    Also, can you confirm you have the follow_post_usergroups() call after you declare your values?

    $edit_flow->notifications->follow_post_usergroups( $post->ID, $usergroup_ids_to_follow, true );

    In either regard, can you add the following above your conditional check?

    var_dump( 'Status: ' . $new_status );
    var_dump( 'Author: ' . $post->post_author );

    This will give you some values we can check against the conditional

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Edit Flow] Auto-subscribe user groups for specific authors’ is closed to new replies.