Hello,
We have an implementation on our site of an import made for WP All Import that takes a . CSV file deposited by an external service over SFTP for tracking the shipping of products.
This tracking file contains the following attributes: date, order reference, tracking number, delivery name, delivery postcode, delivery city, carrier name and url_tracking.
We’ve created a function into WP ALL Import for save this attributes into AST, but after version 3.4.7 of AST this no longer work.
A function into WP All Import :
function import_tracking($order_id=null, $provider=null, $number=null){
$args = array(
'tracking_provider' => $provider,
'tracking_number' => $number,
);
$ast = WC_Advanced_Shipment_Tracking_Actions::get_instance();
$trackitems = $ast->get_tracking_items($order_id);
if(count($trackitems) == 0){
$ast->insert_tracking_item( $order_id, $args );
}
return "";
}
Thanks in advance,
