Skip to content

Instantly share code, notes, and snippets.

@zorem
Last active July 17, 2020 09:02
Show Gist options
  • Save zorem/7d7d8bfa216e486e9040df6e4a138e04 to your computer and use it in GitHub Desktop.
Save zorem/7d7d8bfa216e486e9040df6e4a138e04 to your computer and use it in GitHub Desktop.
Filter for update tracking information when add tracking from orders list and single order page
add_filter('tracking_info_args','tracking_info_args_fun',10,2);
function tracking_info_args_fun($args,$order_id){
if($args['tracking_provider'] == 'australia-post'){
$args['tracking_number'] = '0003006985494006020994';
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment