Title: PHP Warning when bulk export orders
Last modified: November 21, 2022

---

# PHP Warning when bulk export orders

 *  [ricardogrune](https://wordpress.org/support/users/ricardogrune/)
 * (@ricardogrune)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/)
 * 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](https://wordpress.org/support/users/shiptimizeplugins/)
 * (@shiptimizeplugins)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16226605)
 * 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](https://wordpress.org/support/users/ricardogrune/)
 * (@ricardogrune)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16227020)
 * 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](https://wordpress.org/support/users/shiptimizeplugins/)
 * (@shiptimizeplugins)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16227032)
 * 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](https://wordpress.org/support/users/ricardogrune/)
 * (@ricardogrune)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16316412)
 * 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 API16/10 – Geëxporteerd17/
   10 – TrackingID verzonden via API 3SOMZZ49713448323/12 – Shipment was not found23/
   12 – Shipment was deleted in the app. Export again23/12 – Fout bij exporterenWhen
   i go to the page of the order itself i can export this order.
 *  Plugin Author [Shiptimize](https://wordpress.org/support/users/shiptimizeplugins/)
 * (@shiptimizeplugins)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16316462)
 * 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 October3) 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.

 * ![](https://ps.w.org/shiptimize-for-woocommerce/assets/icon-256x256.jpg?rev=2056017)
 * [Shiptimize for WooCommerce](https://wordpress.org/plugins/shiptimize-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/shiptimize-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/shiptimize-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shiptimize-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shiptimize-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Shiptimize](https://wordpress.org/support/users/shiptimizeplugins/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/php-warning-when-bulk-export-orders/#post-16316462)
 * Status: not resolved