• Resolved robmaric

    (@robmaric)


    Hi there, I was having some sync issues and I ran the plugin through Claude Opus 4.5 Thinking to help, and it said it found this issue. Here is what it said:

    File: includes/api/requests/class-wc-shipstation-api-export.php lines 74-86

    Issue:
    $tz_offset is calculated on line 63 but never used. The dates from ShipStation (which are in the store’s timezone) get passed to strtotime() which interprets them as server time.

    Result:
    For stores where WP timezone ≠ server timezone, the date range is wrong and orders fall outside the query window.

    Example from logs (store timezone: Australia/Brisbane, server: UTC):

    Server: 02:13 UTC
    Request: start_date=04:12, end_date=18:13
    → Exported 0 orders (04:12 hasn't happened yet in UTC)

    Suggested fix:

    $wp_timezone = wp_timezone();
    $start_dt = new DateTime( $start_date_local, $wp_timezone );
    $start_dt->setTimezone( new DateTimeZone( 'UTC' ) );
    $start_date = $start_dt->format( 'Y-m-d H:i:s' );

    Plugin version: 4.9.0

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support EastOfWest a11n

    (@eastofwest)

    Hi @robmaric !

    Thanks for highlighting this issue!

    There’s an existing bug report that matches what you’ve described here, with the good that a fix is already in the final stages of review. It should be available in the next update.

    Keep an eye out for that in, hopefully, the next few days. Once available, please make a site backup, update your version, flush any caches your site relies on, and check to see how it works for you.

    If you encounter any further issues, share the details, then we’ll take a closer look.

    Thread Starter robmaric

    (@robmaric)

    Great to hear! Thanks.

    Plugin Support EastOfWest a11n

    (@eastofwest)

    Just to note, 4.9.1 was not the update I was referring to 😅 The fix for this particular issue is still in review, so missed 4.9.1.

    Plugin Support Ejay F – a11n

    (@ejayfernandes)

    It seems we haven’t heard back from you for a while, so I’ll go ahead and mark this thread as resolved. Feel free to reach out whenever you’re ready to continue.

    We’d really appreciate if you could take a moment to leave us a review: https://ww.wp.xz.cn/support/plugin/woocommerce-shipstation-integration/reviews/

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.