woocommerce_email_from_name
Filters the "from" name for outgoing emails.
Usage
add_filter( 'woocommerce_email_from_name', 'wp_kama_woocommerce_email_from_name_filter', 10, 3 );
/**
* Function for `woocommerce_email_from_name` filter-hook.
*
* @param string|mixed $from_name The from name.
* @param WC_Email $email Email object.
* @param string $default_from_name Default from name.
*
* @return string|mixed
*/
function wp_kama_woocommerce_email_from_name_filter( $from_name, $email, $default_from_name ){
// filter...
return $from_name;
}
- $from_name(string|mixed)
- The from name.
- $email(WC_Email)
- Email object.
- $default_from_name(string)
- Default from name.
Changelog
| Since 2.1.0 | Introduced. |
Where the hook is called
woocommerce_email_from_name
woocommerce/includes/emails/class-wc-email.php 1038
$from_name = apply_filters( 'woocommerce_email_from_name', get_option( 'woocommerce_email_from_name', $default ), $this, $from_name );