Hi Everlast00
here is the code that he put into my functions.php file. Please note that I still get the standard transaction report, but I also get a styled copy the same as the customer gets, which is the one that i’ll use for my records, it also makes it easier for me to read ??
/**
* Filter to modify wp_mail header
*/
add_filter('wp_mail','modify_wpec_mail',12,1);
/**
* Modify wp_mail header
*/
function modify_wpec_mail( $vars ) {
extract($vars);
if( isset( $subject ) && $subject ) {
switch( $subject ) {
case __( 'Purchase Report', 'wpsc' ):
case __( 'Transaction Report', 'wpsc' ):
case __( 'Purchase Receipt', 'wpsc' ):
case __( 'Order Pending', 'wpsc' ):
case __( 'Order Pending: Payment Required', 'wpsc' ):
case get_option( 'wpsc_trackingid_subject' ):
$headers = modify_wpec_mail_header( $vars );
}
}
return compact( 'to', 'subject', 'message', 'headers', 'attachments' );
}
/**
* Adds store admin email as BCC
*/
function modify_wpec_mail_header( $vars ) {
extract( $vars );
$headers = $headers."\r\nBcc:".get_option( 'purch_log_email' )."\r\n";
return $headers;
}
/*end*/