Hi,
This is not easily possible currently without customization. You can try following code snippet by putting into the active theme’s functions.php file or creating a snippet using Code Snippets plugin from the backend:
add_action('wpinv_post_send_invoice_notification', 'send_user_invoice_mail_cc', 10, 2);
function send_user_invoice_mail_cc($invoice, $email_type){
if(isset($email_type) && 'user_invoice' != $email_type){
return false;
}
if ( empty( $invoice ) ) {
return false;
}
$invoice_id = $invoice->ID;
$recipient = '[email protected], [email protected]'; //change to your CC email addresses
$subject = wpinv_email_get_subject( $email_type, $invoice_id, $invoice );
$email_heading = wpinv_email_get_heading( $email_type, $invoice_id, $invoice );
$headers = wpinv_email_get_headers( $email_type, $invoice_id, $invoice );
$message_body = wpinv_email_get_content( $email_type, $invoice_id, $invoice );
$attachments = wpinv_email_get_attachments( $email_type, $invoice_id, $invoice );
$content = wpinv_get_template_html( 'emails/wpinv-email-' . $email_type . '.php', array(
'invoice' => $invoice,
'email_type' => $email_type,
'email_heading' => $email_heading,
'sent_to_admin' => false,
'plain_text' => false,
'message_body' => $message_body,
) );
return wpinv_mail_send( $recipient, $subject, $content, $headers, $attachments );
}
This will send another email with the same content to given recipient addresses. Don’t forget to change the email address from ‘[email protected], [email protected]‘ to your email addresses. You can add a comma-separated list of email addresses. Let me know if it helps or not.
Regards,
Patrik