lmartins
5/15/2015 - 11:56 AM

Notifies additional emails when a order is completed. By default this only notifies the Customer.

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;
}