Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce: Add an extra email recipient to the email sent when an order has been completed
/**
* 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