Skip to content

Instantly share code, notes, and snippets.

@sbruner
Created July 4, 2017 02:35
Show Gist options
  • Save sbruner/821481f23620431765c0e011ce7600d3 to your computer and use it in GitHub Desktop.
Save sbruner/821481f23620431765c0e011ce7600d3 to your computer and use it in GitHub Desktop.
function sfire_avatax_http_request_args($args, $this) {
$body = $args['body'];
$body = json_decode($body);
if(!empty($body->PurchaseOrderNo)) {
if(!empty($body->DocCode)) {
$body->DocCode = $body->PurchaseOrderNo;
$body = json_encode( $body );
$args['body'] = $body;
}
}
return $args;
}
add_filter('wc_avatax_http_request_args', 'sfire_avatax_http_request_args', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment