Problem with notification mod
-
I used some instructions to auto-subscribe user groups found here:
https://editflow.org/extend/auto-subscribe-user-groups-for-notifications/And added the code to my functions with my actual array of user groups I want notified when a post’s $new_status is set to “publish”……but it isn’t working. None of the users in the two user groups in my array are getting the notification when a post is scheduled (future date). I checked the WP Codex, and there is no ‘scheduled’ status, a post is considered to be changed to ‘publish’ when it is scheduled.
Here is my actual code added to my functions.php:
// Auto-subscribe user groups to notifications when post is scheduled or published function efx_auto_subscribe_usergroup( $new_status, $old_status, $post ) { global $edit_flow; if ( 'publish' == $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( 587,679 ); $edit_flow->notifications->follow_post_usergroups( $post->ID, $usergroup_ids_to_follow, true ); } // Return true to send the email notification, false to not send return $new_status; } add_filter( 'ef_notification_status_change', 'efx_auto_subscribe_usergroup', 10, 3 );
What might I be doing wrong? Any help would be gratefully appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with notification mod’ is closed to new replies.