[Plugin: Edit Flow] Not sending emails to correct groups
-
Here is the code I have, my goal with it is that once a review is set as pending the editors and admins get notified. Once the editors finish and the review gets set to editing complete the next person receives a notification for final approval. It was working fine until recently and I have no idea what has changed aside from the very last line which you had me add a while back.
function db_add_ef_post_type_support() { add_post_type_support('review', 'ef_notifications'); add_post_type_support('review', 'ef_custom_statuses'); add_post_type_support('review', 'ef_editorial_comments'); } function efx_auto_subscribe_usergroup( $new_status, $old_status, $post ) { global $edit_flow; // Choose the slug for whichever status you'd like to auto-subscribe on if ( 'pending' == $new_status ) { // You'll need to get term IDs for your user groups and place them as // comma-separated values $usergroup_ids_to_follow = array( 537,296, ); $edit_flow->notifications->follow_post_usergroups( $post->ID, $usergroup_ids_to_follow, true ); } if ( 'editing-complete' == $new_status ) { // You'll need to get term IDs for your user groups and place them as // comma-separated values $usergroup_ids_to_follow = array( 943, ); $edit_flow->notifications->follow_post_usergroups( $post->ID, $usergroup_ids_to_follow, true ); } // Return true to send the email notification return true; } add_filter( 'ef_view_calendar_cap', function( $cap ) { return 'edit_posts'; } );
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Plugin: Edit Flow] Not sending emails to correct groups’ is closed to new replies.