1. bt_get_shipping_tracking($order_id);
Returns associative array containing shipment tracking data of a specific order.
Parameters:
- $order_id
(number) The ID of the order whose shipment tracking details have been updated.
Returns:
- Array
(Array) Associative array containing shipment tracking data.
Example:
- <?php
- if(function_exists(‘bt_get_shipping_tracking’))
- {
- $shipment_obj = bt_get_shipping_tracking($order_id);
- if($shipment_obj != null)
- {
- $courier_name = $shipment_obj[“courier_name”];
- $current_status = $shipment_obj[“current_status”];
- $awb = $shipment_obj[“awb”];
- $tracking_url = $shipment_obj[“tracking_url”];
- }
- }
2. bt_force_sync_order_tracking($order_id);
Fetches shipment tracking information from the respective shipment provider that is associated with the specific order.
Parameters:
- $order_id
(number) The ID of the order whose shipment tracking details have been updated.
Returns:
- Array
(Array) Associative array containing shipment tracking data.
Example:
- <?php
- if(function_exists(‘bt_force_sync_order_tracking’))
- {
- $shipment_obj = bt_force_sync_order_tracking($order_id);
- if($shipment_obj != null)
- {
- $courier_name = $shipment_obj[“courier_name”];
- $current_status = $shipment_obj[“current_status”];
- $awb = $shipment_obj[“awb”];
- $tracking_url = $shipment_obj[“tracking_url”];
- }
- }
3. bt_update_shipment_tracking($order_id,$courier_name,$awb_number,$shipping_status,$edd,$tracking_link);
Saves shipment tracking data of an order.
Parameters:
- $order_id
(number) The Order ID. - $courier_name
(string) Courier Name. - $awb_number
(string) AWB Number. - $shipping_status
(string) Shipping Status.
Possible Values: pending-pickup, out-for-pickup, in-transit, out-for-delivery, delivered, canceled, rto-in-transit, rto-delivered
Note: Assigning a value other than above will also work.
- $edd
(string) Estimated Delivery Date (eg. 2022-03-15). - $tracking_link
(string) The Tracking url. Set to empty string to use global tracking url defined in plugin settings.
Returns:
Array
(Array) Associative array containing shipment tracking data.
Example:
- <?php
- if(function_exists(‘bt_update_shipment_tracking’))
- {
- $shipment_obj = bt_update_shipment_tracking ($order_id,$courier_name, $awb_number, $shipping_status, $edd, $tracking_link);
- }