New? Watch our welcome video [here], which goes over the basics of logging in and participating in the forums. Then, check out the [Rules] and our [video] about the features of the forum.

Sort orders and set ship by date in fuction of selected delivery date

I just synced my Woocommerce store with Shipstation.

We ship perishable products for which our clients have to choose a delivery date which can be up to 2 months in advance. We use a plugin called Order Delivery Date Pro to get this information which is displayed on our invoices, emails and order pages. However, when I synced our store with Shipstation this information did not transfer over. I was told I would probably be able to import it using a custom field using this piece of code:

add_filter( ‘woocommerce_shipstation_export_custom_field_2’, ‘shipstation_custom_field_2’ );

function shipstation_custom_field_2() {
return ‘_meta_key’; // Replace this with the key of your custom field

I contacted the plugin's developer to get the correct meta key to use but what he gave me did not work.

Once I'm able to import the delivery date I want to be able to sort the orders by delivery date and if possible I would like to set up an automation that calculates the ship by date based on the delivery date and the shipping method (1 or 2 days). I looked over the automation rules but I am not sure how I could set that up...

Any help would be greatly appreciated.


  • Mireille@D3923Mireille@D3923 Member
    An Apprentice
    For reference here's the code he gave me:

    add_filter( ‘woocommerce_shipstation_export_custom_field_2’, ‘shipstation_custom_field_2’ );

    function shipstation_custom_field_2() {
    $meta_key = get_option( ‘orddd_delivery_date_field_label’ );
    return $meta_key;
Sign In or Register to comment.