Located in: admin-form-functions.php

Functions that call this hook: wpsc_packing_slip()
Arguments Accepted: $purchase_id
Version Introduced: 3.8

Description: Use this hook to add extra details to your packing slip. eg: You could collect special delivery details on your checkout page, that will need to be printed onto the packing slip.

Code in context:
[php firstline=”331″ highlight=”348″]
if ( 2 == get_option( ‘payment_method’ ) ) {
$gateway_name = ”;
$nzshpcrt_gateways = nzshpcrt_get_gateways();

foreach( $nzshpcrt_gateways as $gateway ) {
if ( $purch_data[‘gateway’] != ‘testmode’ ) {
if ( $gateway[‘internalname’] == $purch_data[‘gateway’] ) {
$gateway_name = $gateway[‘name’];
} else {
$gateway_name = __(‘Manual Payment’, ‘wpsc’);

echo "</table>nr";

do_action (‘wpsc_packing_slip_extra_info’,$purchase_id);

echo "<table class=’packing_slip’>";

echo "<tr>";
echo " <th>".__(‘Quantity’, ‘wpsc’)." </th>";

echo " <th>".__(‘Name’, ‘wpsc’)."</th>";

echo " <th>".__(‘Price’, ‘wpsc’)." </th>";

echo " <th>".__(‘Shipping’, ‘wpsc’)." </th>";
echo ‘<th>’ . __(‘Tax’, ‘wpsc’) . ‘</th>’;
echo ‘</tr>’;


Example of use:

add_action(‘wpsc_packing_slip_extra_info’, ‘add_delivery_details’);

function add_delivery_details($purchase_id){

$delivery_details = //write a query here to get out the special details using the purchase_id as the key

echo "$delivery_details" //This will echo the delivery details onto the packing slip.