Title: Getting E_ERROR
Last modified: November 4, 2020

---

# Getting E_ERROR

 *  [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/)
 * Sometimes I receive some error, can you guys check?
 *     ```
       An error of type E_ERROR was caused at line 361 of the file /public/wp-content/plugins/wc-stock-dependencies/admin.php. Error message:  Uncaught Error: Call to a member function is_type() on boolean in /public/wp-content/plugins/wc-stock-dependencies/admin.php:361
       Stack trace:
       #0 /public/wp-content/plugins/wc-stock-dependencies/admin.php(446): StockDependenciesForWooCommerceAdmin\Admin->reduce_order_stock(Object(Automattic\WooCommerce\Admin\Overrides\Order))
       #1 /public/wp-includes/class-wp-hook.php(287): StockDependenciesForWooCommerceAdmin\Admin->before_save_order_items(585, Array)
       #2 /public/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
       #3 /public/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
       #4 /public/wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php(251): do_action('woocommerce_bef...', 585, Array)
       #5 /public/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-items.php(54): wc_save_order_items(585, Array)
       #6 /home/defau
       ```
   

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

 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13621040)
 * Hi, this can only happen if your WooCommerce order has no items, or if it has
   an item that is not a product (but I’m not sure how that’s even possible).
 * Can you tell me what is happening with the WooCommerce order when this error 
   occurs?
 *  Thread Starter [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13621046)
 * This sometimes happens when I try to change order status and I receive a critical
   error and this message by e-mail.
 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13621165)
 * Can you give me an example of the items in the order when this error occurs?
 *  Thread Starter [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13625458)
 * I’ve tried to update an order status and notes and receive the same error.
 * [Critical Error](https://prnt.sc/ve2xq0)
 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13625524)
 * What product items are in your order when you try to update it? And what is the
   stock dependencies settings for the products in the order?
 *  Thread Starter [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13625553)
 * I set a “product base” (that just Adm can access).
 * And I created other products (for non admins) using the stock of this “product
   base”.
 * But for some reason when I try to update some orders, I receive this error – 
   and I can’t update the order.
 * If we can talk by e-mail I can send more private details about my site.
 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13625576)
 * Sure, contact my via my web site [https://kef.ca/contact/](https://kef.ca/contact/)
 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13889808)
 * Hi Robert, is this error still occurring?
 *  Thread Starter [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13934239)
 * Yes, I receive many errors. Now I just tried to update a product and this was
   the result:
 * `Warning: intdiv() expects parameter 2 to be int, string given in /wp-content/
   plugins/wc-stock-dependencies/admin.php on line 150 Warning: intdiv() expects
   parameter 2 to be int, string given in /wp-content/plugins/wc-stock-dependencies/
   admin.php on line 319 Warning: intdiv() expects parameter 2 to be int, string
   given in /wp-content/plugins/wc-stock-dependencies/admin.php on line 322 Warning:
   intdiv() expects parameter 2 to be int, string given in /wp-content/plugins/wc-
   stock-dependencies/admin.php on line 150 Warning: intdiv() expects parameter 
   2 to be int, string given in /wp-content/plugins/wc-stock-dependencies/admin.
   php on line 319 Warning: intdiv() expects parameter 2 to be int, string given
   in /wp-content/plugins/wc-stock-dependencies/admin.php on line 322 Warning: intdiv()
   expects parameter 2 to be int, string given in /wp-content/plugins/wc-stock-dependencies/
   admin.php on line 150 Warning: intdiv() expects parameter 2 to be int, string
   given in /wp-content/plugins/wc-stock-dependencies/admin.php on line 319 Warning:
   intdiv() expects parameter 2 to be int, string given in /wp-content/plugins/wc-
   stock-dependencies/admin.php on line 322 Warning: intdiv() expects parameter 
   2 to be int, string given in /wp-content/plugins/wc-stock-dependencies/admin.
   php on line 150 Warning: intdiv() expects parameter 2 to be int, string given
   in /wp-content/plugins/wc-stock-dependencies/admin.php on line 319 Warning: intdiv()
   expects parameter 2 to be int, string given in /wp-content/plugins/wc-stock-dependencies/
   admin.php on line 322`
    -  This reply was modified 5 years, 2 months ago by [Robert Wo.](https://wordpress.org/support/users/robertbrow/).
 *  Plugin Author [KevinMcCall](https://wordpress.org/support/users/kevinmccall/)
 * (@kevinmccall)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13934346)
 * Hi Robert, what version of the plugin are you currently using?
 *  Thread Starter [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * (@robertbrow)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13934418)
 * Version 1.3
 * For example, the error always occurs if I set a discount using the “Open Pos 
   Plugin”.
    [https://prnt.sc/xb2hfn](https://prnt.sc/xb2hfn)
 * So when I try to update the order, I receive a fatal error:
 * `Fatal error: Uncaught Error: Call to a member function is_type() on bool in /
   wp-content/plugins/wc-stock-dependencies/admin.php:328 Stack trace: #0 /wp-content/
   plugins/wc-stock-dependencies/admin.php(413): StockDependenciesForWooCommerceAdmin\
   Admin->reduce_order_stock(Object(Automattic\WooCommerce\Admin\Overrides\Order))#
   1 /wp-includes/class-wp-hook.php(287): StockDependenciesForWooCommerceAdmin\Admin-
   >before_save_order_items(1633, Array) #2 /wp-includes/class-wp-hook.php(311):
   WP_Hook->apply_filters('', Array) #3 /wp-includes/plugin.php(484): WP_Hook->do_action(
   Array) #4 /wp-content/plugins/woocommerce/includes/admin/wc-admin-functions.php(
   267): do_action('woocommerce_bef...', 1633, Array) #5 /wp-content/plugins/woocommerce/
   includes/admin/meta-boxes/class-wc-meta-box-order-items.php(54): wc_save_order_items(
   1633, Array) #6 /home/defau in /wp-content/plugins/wc-stock-dependencies/admin.
   php on line 328`

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

The topic ‘Getting E_ERROR’ is closed to new replies.

 * ![](https://ps.w.org/wc-stock-dependencies/assets/icon-256x256.png?rev=2283241)
 * [Stock Dependencies for WooCommerce](https://wordpress.org/plugins/wc-stock-dependencies/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-stock-dependencies/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-stock-dependencies/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-stock-dependencies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-stock-dependencies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-stock-dependencies/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Robert Wo.](https://wordpress.org/support/users/robertbrow/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/getting-e_error-2/#post-13934418)
 * Status: not resolved