Last active
April 12, 2022 04:33
-
-
Save zorem/7acdd3906e68721c0f20d3905e79f780 to your computer and use it in GitHub Desktop.
Add tracking info into orders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Check if AST PRO plugin is Installed | |
if ( class_exists( 'AST_Pro_Actions' ) ) { | |
$order_id = '123'; //Replace with your order id | |
$tracking_provider = 'USPS'; //Replace with your shipping provider | |
$tracking_number = '123123'; //Replace with your tracking number | |
$date_shipped = '2020-06-22'; ////Replace with your shipped date | |
$status_shipped = 1; // 0=no,1=shipped,2=partial shipped(if partial shipped order status is enabled) | |
$sku = 't-shirt,blue-jeans'; //the line item (product) SKU | |
$qty = '1,1'; //the line item (product) quantity | |
if ( function_exists( 'ast_insert_tracking_number' ) ) { | |
ast_insert_tracking_number( $order_id, $tracking_number, $tracking_provider, $date_shipped, $status_shipped, $sku, $qty ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment