Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'notification/carrier/email/recipients', function( $recipients ) {
- $exclude_emails = [
- 'email1@example.com',
- 'email2@example.com',
- ];
- foreach ( $exclude_emails as $email ) {
- if ( false !== ( $key = array_search( $email, $recipients ) ) ) {
- unset( $recipients[ $key ] );
- }
- }
- return $recipients;
- }, 10, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement