-
-
Save searchwpgists/666c565d500476acad8d39e40c9e660a to your computer and use it in GitHub Desktop.
Change sender email for email summaries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Change the sender of SearchWP email summaries. | |
| add_filter( 'searchwp/emails_summaries/email_headers', function ( $headers, $args ) { | |
| $old_email = $args['from_address']; | |
| $new_email = 'sender_email@domain.com'; | |
| // Replace the admin email address with new email address. | |
| return str_replace( $old_email, $new_email, $headers ); | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment