Last active
March 14, 2023 09:57
-
-
Save zorem/1f62121b35b4a86764252723656abf1a to your computer and use it in GitHub Desktop.
Set Order Status to Shipped(Completed) when adding tracking information with REST API
This file contains 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
// Add this code to your theme functions.php file or a custom plugin | |
function ast_api_create_item_arg_filter( $args ) { | |
$args['status_shipped'] = 1; | |
return $args; | |
} | |
add_filter( 'ast_api_create_item_arg', 'ast_api_create_item_arg_filter', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment