Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'notification/carrier/email/recipients', function( $recipients, $carrier, $trigger ) {
- // Check if registered Trigger is the one you need.
- if ( 'comment/comment/added' !== $trigger->get_slug() ) {
- return;
- }
- $excluded_emails = [
- 'email@example.com',
- 'another@example.com',
- ];
- return array_diff( $recipients, $excluded_emails );
- }, 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement