wpsc_shipwire_pre_sync

Located in: shipwire_functions.php

Functions that call this hook: sync_products()

Arguments Accepted: $tracking, $inventory

Version Introduced: 3.8.9

Description: This action is triggered before shipwire tracking information is synced.

Code in context:

[php firstline=”599″ highlight=”603″]

$product_code = isset( $_POST[‘product_code’] ) ? $_POST[‘product_code’] : $product_code;

$tracking = self::get_tracking_info();

$inventory = self::get_inventory_info( $product_code );

do_action( ‘wpsc_shipwire_pre_sync’, $tracking, $inventory );

$tracking_updates = 0;

foreach ( $tracking as $order_id => $tracking_number ) {

$tracking_numbers = array_keys( $tracking_number );

$update = (int) $wpdb->update(

WPSC_TABLE_PURCHASE_LOGS,

array(

‘track_id’ => $tracking_numbers[0]

),

array(

‘id’ => $order_id

),

‘%s’,

‘%d’

);

[/php]