Skip to content

Instantly share code, notes, and snippets.

@zorem
Last active February 1, 2021 12:19
Show Gist options
  • Save zorem/66e3c53e8aae968fab0438b19bcc471b to your computer and use it in GitHub Desktop.
Save zorem/66e3c53e8aae968fab0438b19bcc471b to your computer and use it in GitHub Desktop.
Replace tracking provider
<?php
// Add this code to your theme functions.php file or a custom plugin
function ast_api_create_item_arg_filter( $args ) {
if( $args['tracking_provider'] == 'dhlglobalmail' ){
$args['tracking_provider'] = 'dhl-express';
}
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