Custom Notification Recipients not works
- 
		
			- 
Giuseppe Guerrasio Participant# il y a 2 annéesHi, i need to send admin notifications only to one administrator user. I try adding code on functions.php, but not works, all administrators continue to receive new content email. How can i solve? 
- 
Matias Larralde Maître des clés# il y a 2 annéesHello, Don’t put code snippets in your theme functions.php file, use a custom plugin instead. Else, those functions will be triggered too late and not being executed. Also, do not hesitate to copy/paste there the code snippet you are using and I’ll let you know if it is correct. Regards. 
- 
Giuseppe Guerrasio Participant# il y a 2 annéesHi, i dit it with custom plugin, but it continue to not works. Please can you helpe me? 
- 
Giuseppe Guerrasio Participant# il y a 2 annéesPS I use this code: /** 
 * Custom admin notifications recipients
 *
 * @param $recipients array Actual list of recipients that will receive admin notifications
 *
 * @return int[] admin recipients IDs
 */
 function wpca_customize_admin_notifications_recipients($recipients) {// This line will add new recipient to the list, with user ID 8, which will receive all admin notifications 
 $recipients[] = 8;return $recipients; 
 }
 add_filter(‘cuar/notifications/administrator-recipient-ids’, ‘wpca_customize_admin_notifications_recipients’);
- 
Matias Larralde Maître des clés# il y a 2 annéesHello, This PHP syntax allows you to add a recipient to the actual list of administrators: $recipients[] = 8;Change it to this if you want to override the actual list: $recipients = [8];Regards. 
 
- 
The topic ‘Custom Notification Recipients not works’ is closed to new replies.