Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeveloperWil/b16e271326bd6fd89605bb9188037ba2 to your computer and use it in GitHub Desktop.
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
/**
* 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