function _wpsc_transaction_results_html($purchase_log) { $output = wpsc_get_transaction_html_output($purchase_log); if (version_compare(WPSC_VERSION, '3.8.9', '>=')) { echo $output; } return $output; }
/** * transaction_results function main function for creating the purchase reports, transaction results page, and email receipts * @access public * * @since 3.7 * @param $sessionid (string) unique session id * @param echo_to_screen (boolean) whether to output the results or return them (potentially redundant) * @param $transaction_id (int) the transaction id */ function transaction_results($sessionid, $display_to_screen = true, $transaction_id = null) { global $message_html, $echo_to_screen, $purchase_log; // pre-3.8.9 variable $echo_to_screen = $display_to_screen; $purchase_log_object = new WPSC_Purchase_Log($sessionid, 'sessionid'); // compatibility with pre-3.8.9 templates where they use a global // $purchase_log object which is simply just a database row $purchase_log = $purchase_log_object->get_data(); // pre-3.8.9 templates also use this global variable $message_html = wpsc_get_transaction_html_output($purchase_log_object); do_action('wpsc_transaction_results_shutdown', $purchase_log_object, $sessionid, $display_to_screen); return $message_html; }