These filters change the sender used by AutomateWoo. The address filter demonstrates changing it only for the plain template.
Developer note:
Add custom PHP in a small custom plugin or child theme, and test it on a staging site before production. This example requires ongoing maintenance when extension APIs change.
functions.php
<?php
add_filter( 'automatewoo/mailer/from_name', 'my_store_automatewoo_from_name' );
add_filter( 'automatewoo/mailer/from_address', 'my_store_automatewoo_from_address', 10, 2 );
/**
* Set the AutomateWoo sender name.
*
* @param string $from_name Existing sender name.
* @return string
*/
function my_store_automatewoo_from_name( $from_name ) {
return $from_name ? 'My Store' : $from_name;
}
/**
* Set the sender address for the plain template.
*
* @param string $from_address Existing sender address.
* @param string $template_id Template ID.
* @return string
*/
function my_store_automatewoo_from_address( $from_address, $template_id ) {
return 'plain' === $template_id ? 'plain@example.org' : $from_address;
}