// modify Content-Type for HTTP Post ( Pro version)
add_filter(‘wc_order_export_http_args’, function ($args) {
$args[‘headers’][‘Content-Type’] = “text/csv”;
return $args;
});
// send xml as POST variable “xml” ( Pro version)
add_filter(‘wc_order_export_http_args’, function ($args) {
$args[‘body’] = http_build_query( array(“xml”=>$args[‘body’]) );
return $args;
});
// parse and save HTTP reply ( Pro version)
add_filter(‘woe_export_http_response’, function ($response) {
$parts = explode(“,”, $response[‘body’] ); // we get reply as plan text – “Tracking Number, Amount”
update_post_meta( WC_Order_Export_Engine::$order_id, “tracking_number”, $parts[0]);
update_post_meta( WC_Order_Export_Engine::$order_id, “tracking_price”, $parts[1]);
return $response;
});
// Status Change job sends GET request , default action won’t work
add_filter(“woe_export_http_custom_action”, function($response, $url, $args) {
$order = new WC_Order(WC_Order_Export_Engine::$order_id);

//make vars here
$vars = array();
$vars[‘key’] = “secretkey”;
$vars[‘id’] = $order->get_id();
$vars[‘recipient’] = $order->get_shipping_first_name() . ” ” . $order->get_shipping_last_name();
$vars[‘company’] = $order->get_shipping_company();
$vars[‘street’] = $order->get_shipping_address_1();
$vars[‘city’] = $order->get_shipping_city();
$vars[‘state’] = $order->get_shipping_state();
$vars[‘countrycode’] = $order->get_shipping_country();
$vars[‘zipcode’] = $order->get_shipping_postcode();
$vars[‘phone’] = $order->get_billing_phone();

//send
$url .= “?” . http_build_query($vars);
$response = wp_remote_get($url, $args);
return $response;
},10,3);