Skip to content

Instantly share code, notes, and snippets.

@sonnetmia
Last active June 18, 2018 17:04
Show Gist options
  • Save sonnetmia/43ec102aa3884b025a9188207de37240 to your computer and use it in GitHub Desktop.
Save sonnetmia/43ec102aa3884b025a9188207de37240 to your computer and use it in GitHub Desktop.
WordPress default email and Name FROM change
//use this code into your functions.php file.
function bb_sender_email( $original_email_address ) {
return '[email protected]';
}
// Function to change sender name
function bb_sender_name( $original_email_from ) {
return 'Your Name';
}
// Hooking up our functions to WordPress filters
add_filter( 'wp_mail_from', 'bb_sender_email' );
add_filter( 'wp_mail_from_name', 'bb_sender_name' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment