You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WooCommerce更新后导出至ShipStation订单日期显示01-01-1970求助

Troubleshooting WooCommerce → ShipStation Order Date Showing 01-01-1970 After Update

Hey there, I’ve helped debug a few similar issues post-WooCommerce updates, and that 01/01/1970 date (Unix timestamp 0) almost always points to a date parsing or timestamp retrieval failure. Since your database data checks out and LastModified is correct, let’s break down the most likely causes and fixes:

1. WooCommerce’s Order Date Field Logic Changed

Recent WooCommerce updates shifted away from direct access to old date strings (like $order->order_date) in favor of using WC_DateTime objects via methods like get_date_created(). If the ShipStation integration isn’t using these new methods, it might be pulling an empty or invalid value that defaults to timestamp 0.

  • Test the date retrieval: Add this quick snippet to your theme’s functions.php (backup first!) to verify what date data WooCommerce is returning:
    add_action('woocommerce_after_order_details', 'debug_order_date_data');
    function debug_order_date_data($order) {
        echo '<strong>Debug Order Date:</strong><br>';
        echo 'Created Date (Formatted): ' . $order->get_date_created()->format('m/d/Y H:i') . '<br>';
        echo 'Created Timestamp: ' . $order->get_date_created()->getTimestamp() . '<br>';
    }
    
    If the timestamp here is 0 or the formatted date is wrong, the issue is with WooCommerce’s internal date handling. If it’s correct, the problem lies in how the ShipStation feed formats this data.

2. Outdated ShipStation Integration Plugin

If you’re using the official WooCommerce ShipStation Integration plugin, it might not be updated to support the latest WooCommerce date object changes. Old versions often rely on deprecated fields that no longer populate correctly.

  • Fix: Head to your WordPress plugins page, check for updates to the ShipStation plugin, and install the latest version. If that doesn’t work, try temporarily deactivating and reactivating the plugin to reset any cached settings.

3. Custom Push Code Needs Date Format Adjustment

If you’re using a custom script to push orders to ShipStation, you’ll need to update how you fetch and format the order date to match WooCommerce’s current structure.

  • Bad (old way):
    $order_date = $order->order_date; // Deprecated in newer WooCommerce versions
    
  • Good (new way):
    // Get the WC_DateTime object and format it to match ShipStation's required mm/dd/yyyy HH:mm format
    $order_date = $order->get_date_created()->format('m/d/Y H:i');
    
    This ensures you’re pulling the correct, timezone-aware date data and formatting it exactly as ShipStation expects.

4. Timezone Mismatch Causing Parsing Errors

Even if your database data is correct, a mismatch between WooCommerce’s timezone settings and ShipStation’s can cause date values to be parsed as invalid, leading to the 1970 fallback.

  • Check settings:
    • Go to WooCommerce → Settings → General and confirm your store timezone is set correctly.
    • Log into ShipStation’s admin and verify its timezone matches your WooCommerce store.
    • Double-check your wp_options database table for timezone_string and gmt_offset values—make sure they align with your store settings.

5. Conflicting Plugins Altering Order Date Metadata

Some third-party plugins (like order scheduling or custom date tools) might add custom metadata fields for order dates. WooCommerce updates could cause the ShipStation integration to accidentally pull these custom fields instead of the native order creation date.

  • Debug:
    • In your wp_postmeta table, look for metadata entries for the problematic order ID (search for post_id = [your-order-id]).
    • Check for fields like _custom_order_date or similar—if any have a value of 0 or an invalid date, temporarily disable the plugin that adds this field and test a new order push.

Start with updating the ShipStation plugin and testing the date retrieval snippet—those are the quickest wins for this issue!

内容的提问来源于stack exchange,提问作者jnayer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:14:00