I got it figured out and here is how I did it in case anyone needs it because I cannot a free plug in that allows you to add the notes. Its helpful to add the order log notes to emails because when you resend the receipt to the customer it informs them of any changes.
In my theme’s functions file. I added.
function wpsc_get_notes($purchase_id ) {//$purchase_id
$purchase_log_notes = $wpdb->get_var( $wpdb->prepare( 'SELECT notes FROM ' . WPSC_TABLE_PURCHASE_LOGS . " WHERE id = %d", $purchase_id ) );
return $purchase_log_notes;
And then I created a class that I adapted from what I found here https://gist.github.com/webaware/4964078.
class WpscExtendCustEmailNotes {
/**
* add filter hooks
*/
public function __construct() {
add_filter('wpsc_purchase_log_customer_notification_raw_message', array($this, 'customerMessage'), 10, 2);
}
/**
* intercept filter hook for customer notification message
*/
public function customerMessage($msg, $log_notification) {
global $purid;
$order_notes = wpsc_get_notes($purid);
$msg .= "\n\n" .str_repeat('=', 85) . "\n";
$msg .= "\n\n<strong>Order notes:</strong>";
$msg .= "\n\n$order_notes\n";
return $msg;
}
}
new WpscExtendCustEmailNotes();