Integration with WP ALL Import

[ad_1]

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,

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer