order_id); if ($google_order_number && $shipment->is_new) { $xml_data = ''; foreach ($shipment->packages as $package) { if ($package->tracking_number) { $tracking_number = $package->tracking_number; } else if ($shipment->tracking_number) { $tracking_number = $shipment->tracking_number; } if ($tracking_number) { foreach ($package->products as $product) { $xml_data .= ''; $xml_data .= ''; $xml_data .= '' . check_plain($product->nid . '|' . $product->model) . ''; $xml_data .= ''; $xml_data .= ''; $xml_data .= ''; $xml_data .= '' . check_plain($shipment->carrier) . ''; $xml_data .= '' . check_plain($tracking_number) . ''; $xml_data .= ''; $xml_data .= ''; $xml_data .= ''; } } } if ($xml_data) { $request = '' . "\n"; $request .= ''; $request .= ''; $request .= $xml_data; $request .= ''; $request .= 'true'; $request .= ''; $response = uc_google_checkout_send_request('request', $request); } } break; case 'delete': $google_order_number = uc_google_checkout_get_google_number($shipment->order_id); if ($google_order_number) { foreach ($shipment->packages as $package) { foreach ($package->products as $product) { $reset_ids[] = check_plain($product->nid . '|' . $product->model); } } $request = '' . "\n"; $request .= ''; $request .= ''; foreach (array_unique($reset_ids) as $item_id) { $request .= ''; $request .= '' . $item_id . ''; $request .= ''; } $request .= ''; $request .= 'false'; $request .= ''; } $response = uc_google_checkout_send_request('request', $request); break; } } /** * @} End of "addtogroup hooks". */