Created
April 22, 2022 08:07
-
-
Save bradleysa/1c6a91ce6b8e68c23ed58867070a55a9 to your computer and use it in GitHub Desktop.
Email: Change Sender Name and Address
This file contains 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
// Function to change email address | |
function pbj_sender_email( $original_email_address ) { | |
return 'example@yourshop.com'; | |
} | |
// Function to change sender name | |
function pbj_sender_name( $original_email_from ) { | |
return 'Your Shop Name'; | |
} | |
// Hooking up our functions to WordPress filters | |
add_filter( 'wp_mail_from', 'pbj_sender_email' ); | |
add_filter( 'wp_mail_from_name', 'pbj_sender_name' ); | |
/** https://www.wpbeginner.com/plugins/how-to-change-sender-name-in-outgoing-wordpress-email/ **/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment