• Hi,

    Something strange is happening when i want to bulk export my orders. If i go to the order page i can export the orders on the first page but when i go to page 3 i get a php warning: PHP Warning: Invalid argument supplied for foreach() public_html/wp-content/plugins/shiptimize-for-woocommerce/includes/class-woo-shiptimize-order.php on line 684 and i cannot export the order.

    Another strange thing is that i can export the order when in open the order en export it from there. But that obviously to much time consuming with more than 100 orders a day.

    Hope to hear soon,

    Ricardo

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shiptimize

    (@shiptimizeplugins)

    Hi ??

    Thank you for reaching out, we could not reproduce.

    What does that line of code contain? Or at least what function is it? We checked with the version associated with your keys and it would be impossible for that error to be triggered there, so perhaps you pasted the error before an update?

    Thread Starter ricardogrune

    (@ricardogrune)

    Hi,

    What do you mean with what does that line of code contain? It is from your plugin.

    I have tried it before an update and after a and also tried with different versions i still had. But we cannot export the orders.

    Plugin Author Shiptimize

    (@shiptimizeplugins)

    We mean line 684 of that class, in the version associated with your keys, contains
    ‘Type’ => 4, // 1 – Gift, 2 – Documents, 3 – Sample , 4 – Other

    which could never trigger a foreach error. So it could be for ex that the indication of the version in your keys is not up to date.
    Would help imensely if you could either paste the line, or provide a more detailed description of the error. Example there should be a backtrace associated with that error, what other classes or functions are referred?

    This information will help us find a way to reproduce the error.

    Thread Starter ricardogrune

    (@ricardogrune)

    Hi sorry for my late response. This issue was resolved by itself. But we have a strange new error.

    Some of the orders wont’ export and some order will export.
    This is one of the logs when we hover over the icon in the orders page:
    16/10 – Automatisch een andere vervoerder geselecteerd door API
    16/10 – Ge?xporteerd
    17/10 – TrackingID verzonden via API 3SOMZZ497134483
    23/12 – Shipment was not found
    23/12 – Shipment was deleted in the app. Export again
    23/12 – Fout bij exporteren

    When i go to the page of the order itself i can export this order.

    Plugin Author Shiptimize

    (@shiptimizeplugins)

    Are you trying to reprint a label? or create a new one?
    From the messages you pasted there looks like that order was:
    1) Exported in October
    2) A label was created in the app for that order in October
    3) You tried to create a label for that same order in december
    4) It cannot find the shipment, will have to check, but probably because it’s already delivered and archived

    Currently it’s not possible to print 2 different labels for the same order in woocommerce as the order name is a unique in our system.

    Was this what you were trying to do?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning when bulk export orders’ is closed to new replies.