Title: Undefined variable $orders
Last modified: February 7, 2025

---

# Undefined variable $orders

 *  [Daniel Harper](https://wordpress.org/support/users/danhrpr/)
 * (@danhrpr)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-variable-orders/)
 * When our orders statuses are changed from processing to complete it generates
   the following in the log file. Although it doesn’t seem to cause an issue but
   our log file is completely clean other than this.
 *     ```wp-block-code
       PHP Warning: Undefined variable $orders in /app/web/app/plugins/woocommerce-sendinblue-newsletter-subscription/src/managers/api-manager.php on line 14
       ```
   
 * We’re using the latest version of the Brevo plugin and WC 9.6.x
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fundefined-variable-orders%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Daniel Harper](https://wordpress.org/support/users/danhrpr/)
 * (@danhrpr)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-variable-orders/#post-18293298)
 * Just to add, the order status change is being triggered through the an api.
 * It’s an order system that’s changing the order status not a user.
 *  Plugin Author [Pritesh Kumar](https://wordpress.org/support/users/prikuma/)
 * (@prikuma)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-variable-orders/#post-18293497)
 * Hi [@danhrpr](https://wordpress.org/support/users/danhrpr/) , Thanks for sharing.
   
   _Just to add, the order status change is being triggered through the an api._We
   will verify it. FYI, the plugin relies on default _WooCommerce_ order related
   hooks.Since, in the above case order status is being changed using an api, it
   can be that the hooks doesn’t have proper data. We will look further into it 
   and get back to you in case we need more details.Regards,Pritesh Kr
    -  This reply was modified 1 year, 3 months ago by [Pritesh Kumar](https://wordpress.org/support/users/prikuma/).
 *  Thread Starter [Daniel Harper](https://wordpress.org/support/users/danhrpr/)
 * (@danhrpr)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-variable-orders/#post-18298771)
 * I will double check how the order status is being changed in the order system
   plugin, perhaps they are changing it with their own custom API instead of the
   default Woo one.

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

The topic ‘Undefined variable $orders’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-sendinblue-newsletter-subscription/assets/icon-
   256x256.png?rev=2993192)
 * [Brevo for WooCommerce](https://wordpress.org/plugins/woocommerce-sendinblue-newsletter-subscription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-sendinblue-newsletter-subscription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-sendinblue-newsletter-subscription/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-sendinblue-newsletter-subscription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-sendinblue-newsletter-subscription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-sendinblue-newsletter-subscription/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Daniel Harper](https://wordpress.org/support/users/danhrpr/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/undefined-variable-orders/#post-18298771)
 * Status: not resolved