• Resolved jamelescroc

    (@jamelescroc)


    After reconnecting our store to ShipStation today (March 4, 2026), the plugin switched to the REST API with no option to use the XML Legacy API which was working perfectly. Two major issues:

    1. Stale sync cursor (critical) ShipStation keeps sending modified_after=2026-02-18 on every sync cycle despite the store being reconnected today on March 4. This means it re-fetches 2,500+ orders (26+ pages of 100) every single time instead of just new ones. We have no idea why ShipStation chose February 18 as its starting point — it does not correspond to any action on our side.

    We confirmed this from our Apache logs:

    35.173.55.253 [04/Mar/2026:01:50:32] GET /wp-json/wc-shipstation/v1/orders?modified_after=2026-02-18T01:50:32.952Z&page=25&per_page=100 → 200 (61,802 bytes)
    35.173.55.253 [04/Mar/2026:01:50:35] GET /wp-json/wc-shipstation/v1/orders?modified_after=2026-02-18T01:50:35.567Z&page=26&per_page=100 → 200 (62,461 bytes)

    We deployed a server-side workaround (mu-plugin) that overrides the stale modified_after to a recent date. Sync became instant. This proves the issue is the stale cursor, not server performance.

    2. REST API is significantly heavier than XML Legacy The REST API returns 2-3x more data per order (2 images instead of 1, per-item taxes, buyer user object, dimensions, COGS, ISBN, fulfillment_sku, etc.). Combined with the cursor issue, this makes every sync extremely slow.

    3. COGS log spam (WooCommerce 10.5.3) get_cogs_value() is called in class-orders-controller.php without checking if the COGS feature is enabled, generating millions of wc_doing_it_wrong log entries. The code checks is_callable() but not the woocommerce_cogs_enabled option.

    Environment: WooCommerce 10.5.3, ShipStation plugin 4.9.2

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jamelescroc

    (@jamelescroc)

    I just tested with version 4.9.3 and there’s no difference; the application continues to make synchronization requests with “modified_after” set to 2 weeks late, despite there being orders from just a few minutes ago. There really seems to be a problem with the cursor. Also, you haven’t fixed the COGS log spam issue.

    Bug: get_cogs_value() called without checking if COGS feature is enabled (v4.9.3)

    File: includes/api/rest/class-orders-controller.php, line ~868

    Current code:

    php

    $unit_cost = is_callable( array( $item, 'get_cogs_value' ) ) ? $item->get_cogs_value() : 0;

    Problem: Since WooCommerce 9.5.0, get_cogs_value() exists on WC_Order_Item regardless of whether the “Cost of Goods Sold” feature is enabled. When COGS is disabled, calling this method triggers a wc_doing_it_wrong notice on every call. Since this line runs for every order item on every ShipStation sync, it generates millions of log entries.

    Fix: Check the woocommerce_cogs_enabled option before calling the method:

    php

    $cogs_enabled = 'yes' === get_option( 'woocommerce_cogs_enabled', 'no' );
    $unit_cost    = $cogs_enabled && is_callable( array( $item, 'get_cogs_value' ) ) ? $item->get_cogs_value() : 0;

    Ideally, cache the option lookup in a class property to avoid calling get_option() on every item in a loop.

    Environment: WooCommerce 10.5.3, ShipStation plugin 4.9.3

    Plugin Author SamNajian

    (@samnajian)

    Hello @jamelescroc

    Sorry to hear you’re going through issues with the latest version of the extension and thanks for providing more details, however we need more information to checkout this specific case, please use https://woocommerce.com/my-account/contact-support/#contact-us to provide us with more details ( email or store URL ) so that we can’t investigate more closely.

    Thread Starter jamelescroc

    (@jamelescroc)

    Hello! I have already contacted WooCommerce and have been in touch since last week regarding the COGS. You have already patched it in version 4.9.4 following my report. For the other issue, ShipStation has also made a correction since I submitted a report on their side as well. Thank you, have a great day!

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @jamelescroc

    Glad to hear both issues have been sorted out, and thanks for taking the time to report them so thoroughly. Your detailed findings really helped move things along quickly

    That said, if you get a moment, sharing your experience in a review would mean a lot. It helps other store owners when evaluating the plugin and helps our team keep improving. You can leave your review here.

    If anything else comes up, feel free to open a new topic. Have a great day!

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

You must be logged in to reply to this topic.