In questo articolo vedremo come modificare il campo From delle e-mail inviate da WordPress.
Aggiungete il seguente codice al file functions.php
, ovviamente sostituendo i valori fittizi con quelli reali:
add_filter( 'wp_mail_from', 'my_new_mail_from' );
add_filter( 'wp_mail_from_name', 'my_new_mail_from_name' );
function my_new_mail_from( $old ) {
return 'username@site.tld';
}
function my_new_mail_from_name( $old ) {
return 'Valore';
}