Last active
February 24, 2020 06:08
-
-
Save meetawahab/b5f31c28cfd2672eb8da9a3362a52bb0 to your computer and use it in GitHub Desktop.
Changing Default Sender Name and Email.
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 | |
// Function to change email address. | |
function ab610_sender_email( $original_email_address ) { | |
return '[email protected]'; | |
} | |
// Function to change sender name. | |
function ab610_sender_name( $original_email_from ) { | |
return 'Site or Your Name'; | |
} | |
// Hooking up our functions to WordPress filters. | |
add_filter( 'wp_mail_from', 'ab610_sender_email' ); | |
add_filter( 'wp_mail_from_name', 'ab610_sender_name' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment