Product Icon

ShipStation for WooCommerce

by  Woo
Ship your WooCommerce orders with confidence, save on top carriers, and automate your processes with ShipStation.

Shipstation integration – add prefix to order ids to prevent conflicts

This is necessary for people who want to connect multiple stores to a shipstation account.
For example: if shipstaion already has order ID 1000, then woocommerce exports an order with ID 1000. To tell those apart I’d like the option to add a prefix when the export XML is generated so that it is sent to shipstation as WC1000. Unfortunately the file class-wc-shipstation-api-export.php doesn’t have anything to add a hook at that point.
An option to add a prefix from admin would be ideal, but adding something to let me add a hook to change the order id and number being exported would also work.
I made sure this would work with shipstation by editing lines 117 and 118 in class-wc-shipstation-api-export.php by changing them to
$this->xml_append( $order_xml, ‘OrderNumber’, “WC$formatted_order_number” );
$this->xml_append( $order_xml, ‘OrderID’, “WC$order_id” );
and the orders were exported without any issues.

Author

Current Status

Open

Last updated: March 12, 2020

0 comments

Log in to comment on this feature request.