wpsc_transaction_send_email_to_admin

Located in: purchase-log.helpers.php

Functions that call this hook: wpsc_send_admin_email()

Arguments Accepted: $purchase_notification_object, $is_email_sent

Version Introduced: 3.8.9

Description: This action is triggered after a purchase report has been emailed to the admin.

Code in context:

[php firstline=”219″ highlight=”234″]

function wpsc_send_admin_email( $purchase_log, $force = false ) {

if ( ! is_object( $purchase_log ) )

$purchase_log = new WPSC_Purchase_Log( $purchase_log );

if ( $purchase_log->get( ’email_sent’ ) && ! $force )

return;

$email = new WPSC_Purchase_Log_Admin_Notification( $purchase_log );

$email_sent = $email->send();

if ( $email_sent ) {

$purchase_log->set( ’email_sent’, 1 );

$purchase_log->save();

}

do_action( ‘wpsc_transaction_send_email_to_admin’, $email, $email_sent );

return $email_sent;

}

[/php]