Change “From” Email Address
In WordPress, all emails are sent using the wp_mail() function. You can change the “From” email address under Settings –> General or with the code from this post. The email address that is displayed at “From” is changed when, for example, a customer buys a product and receives an order email. This is also the email address to which the customer sends an email when replying to this email.
You can change the Name that displays before the email address and the email address by adding the following code to your functions.php file. But note that you need to choose an email address that matches your domain, otherwise Woocommerce will not send the emails. So for example, if an email is to be sent from arrowdesign.ie, the email address must be something like “cathal@arrowdesign.ie”.
function arrow_design_woo_custom_wp_mail_from_name() { $emailNameToSendFrom = "Arrow Design"; return $emailNameToSendFrom; } add_filter( 'wp_mail_from_name', 'arrow_design_woo_custom_wp_mail_from_name', 99 ); function arrow_design_woo_custom_wp_mail_from() { $emailAddressToSendFrom = "cathal@arrowdesign.ie"; return $emailAddressToSendFrom; } add_filter( 'wp_mail_from', 'arrow_design_woo_custom_wp_mail_from', 99 );
This code will change the “From” part in the emails to: From: Arrow Design <cathal@arrowdesign.ie>
Conclusion
We hope this Change “From” Email Address post was helpful and you are now able to integrate this also on your website! You can find more articles here:
Read another Woocommerce post : ‘Quick Translation of any String‘
Arrow Design, based in Dublin, Ireland, provides quality website design services in Dublin and beyond at affordable prices. If you would like help with implementing the above code, or any wordpress website development project, contact us. We love website design and it shows! We provide custom wordpress plugin development, website design training and lots more.
We do it all, so you don’t have to!
Related Posts
Woocommerce Account Page Hook Guide
In this article you will find a visual hook guide for the Woocommerce Account Pages, like the Login/Register page, the Downloads page or the Orders page.
Woocommerce Single Product Page Hook Guide
In this article you will find a visual hook guide for the Woocommerce Single Product Page. This should help you to quickly and easily find the hook positions on the page.
Woocommerce PHP – Product Categories by Product ID
In this tutorial you will learn how to check if a product is assigned to a tag, a category or a custom taxonomy. You can check if a product is is on the shop page, in the cart, in an order & more.
…We do more, so you can do less 🙂