Created
March 8, 2021 22:48
-
-
Save DeveloperWil/b16e271326bd6fd89605bb9188037ba2 to your computer and use it in GitHub Desktop.
WooCommerce: Add an extra email recipient to the email sent when an order has been completed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add extra emails to the WC email sent when an order has been completed. | |
* | |
* Make sure you separate multiple emails with a comma. | |
* | |
* @param $recipient | |
* @param $object | |
* @return string | |
*/ | |
function zpd_wc_extra_email_recipient( $recipient, $object ): string { | |
$recipient = $recipient . ', shop@zpddemo.com'; | |
return $recipient; | |
} | |
add_filter( 'woocommerce_email_recipient_customer_completed_order', 'zpd_wc_extra_email_recipient', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment