Allows developers to modify the arguments when adding a shipment tracking via REST API Description


The ast_api_create_item_arg filter allows developers to modify the arguments passed when creating a shipment tracking item via the Advanced Shipment Tracking (AST) plugin’s REST API.


Developers can use this filter to customize the parameters of the shipment tracking item being created, including the tracking provider, tracking number, date shipped, and more.


add_filter( 'ast_api_create_item_arg', 'custom_ast_api_create_item_arg', 10, 2 );

function custom_ast_api_create_item_arg( $args, $request ) {
    // Modify the status_shipped parameter to 1 (shipped)
    $args['status_shipped'] = 1;

    // Add additional customizations here if needed

    return $args;

In this example, the custom_ast_api_create_item_arg function modifies the status_shipped parameter to indicate that the order has been shipped (status code 1). Developers can add further customizations within this function as required.


Billed annually

Buy Now