Skip to content

Instantly share code, notes, and snippets.

@lmartins
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmartins/634943a137667d63ac35 to your computer and use it in GitHub Desktop.
Save lmartins/634943a137667d63ac35 to your computer and use it in GitHub Desktop.
Notifies additional emails when a order is completed. By default this only notifies the Customer.
/*
* ----------------------------------------------------------------------------
* ADDS ANOTHER RECIPIENT TO COMPLETE ORDER EMAIL NOTIFICATION
* Permite que as notificações enviadas para o cliente sejam copiadas
* em BCC para outros destinatarios
* ----------------------------------------------------------------------------
*/
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 3);
function mycustom_headers_filter_function( $headers, $email_id, $object ) {
if ($email_id == 'customer_completed_order') {
$headers .= 'BCC: name@domain.com, name@domain.com' . "\r\n";
}
return $headers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment