Created
October 12, 2021 17:55
-
-
Save wpmark/786a597d892d831f8de31f113f32c78b to your computer and use it in GitHub Desktop.
Easily customise the name and email address of WordPress emails
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
<?php | |
/** | |
* Used to filter email from 'address' | |
*/ | |
function hd_email_send_wp_mail_address( $input ) { | |
// return a new from email address. | |
return 'no-reply@highrise.digital'; | |
} | |
add_filter( 'wp_mail_from', 'hd_email_send_wp_mail_address' ); | |
/** | |
* Used to filter email from 'name' | |
*/ | |
function hd_email_send_wp_mail_name( $input ) { | |
return __( 'Highrise Digital' ); // you can set this string to whatever you want. | |
} | |
add_filter( 'wp_mail_from_name', 'hd_email_send_wp_mail_name' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment