Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Last active September 14, 2022 11:27
Show Gist options
  • Save danielbitzer/9be32ebdacab6d2d62a02677772a7c34 to your computer and use it in GitHub Desktop.
Save danielbitzer/9be32ebdacab6d2d62a02677772a7c34 to your computer and use it in GitHub Desktop.
AutomateWoo - Customize your email sender name
<?php
// change the from name
add_filter( 'automatewoo/mailer/from_name', function( $from_name ) {
return 'My Custom From Name';
});
// change the from address
add_filter( 'automatewoo/mailer/from_address', function( $from_email ) {
return '[email protected]';
});
// change the from based on the template
add_filter( 'automatewoo/mailer/from_address', function( $from_email, $template_id ) {
if ( $template_id == 'plain' ) {
return '[email protected]';
}
else {
return '[email protected]';
}
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment