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?
This sometimes happens when I try to change order status and I receive a critical error and this message by e-mail.
Can you give me an example of the items in the order when this error occurs?
I’ve tried to update an order status and notes and receive the same error.
Critical Error
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?
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.
Sure, contact my via my web site https://kef.ca/contact/
Hi Robert, is this error still occurring?
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 2 years, 4 months ago by
Robert Wo..
Hi Robert, what version of the plugin are you currently using?
Version 1.3
For example, the error always occurs if I set a discount using the “Open Pos Plugin”.
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