PHP Fatal error when clicking Update on certain products
-
we added barcodes via CSV import and then bulk edited them to set the status to published so the barcodes were sent to Zettle (see other support thread) however a few products threw a PHP Fatal error when we clicked update.
I noticed that each product had a ← icon to the right of the name which means it is a grouped product However they were not grouped and were simple or variable.
To fix it I changed them to grouped (after disabling the zettle plugin, otherwise it threw more fatal errors) and saved and then changed them back to single or variable by saving then reactivated the zettle plugin and then saved again and this solved the issue.
I thought you might want to know about the error
[27-Jul-2022 07:33:42 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Inpsyde\WcEvents\Hooks\ProductHooks::beforeSave() must be an instance of WC_Product, bool given, called in /home/time/public_html/wp-content/plugins/zettle-pos-integration/modules/inpsyde-woocommerce-lifecycle-events/src/Hooks/ProductHooks.php on line 195 and defined in /home/time/public_html/wp-content/plugins/zettle-pos-integration/modules/inpsyde-woocommerce-lifecycle-events/src/Hooks/ProductHooks.php:167
Stack trace:
#0 /home/timec/public_html/wp-content/plugins/zettle-pos-integration/modules/inpsyde-woocommerce-lifecycle-events/src/Hooks/ProductHooks.php(195): Inpsyde\WcEvents\Hooks\ProductHooks->beforeSave(false)
#1 /home/time/public_html/wp-content/plugins/zettle-pos-integration/modules/inpsyde-woocommerce-lifecycle-events/src/Hooks/ProductHooks.php(372): Inpsyde\WcEvents\Hooks\ProductHooks->beforeSave(Object(WC_Product_Simple))
#2 /home/time/public_html/wp-includes/class-wp-hook.php(307): Inpsyde\WcEvents\Ho in /home/time/public_html/wp-content/plugins/zettle-pos-integration/modules/inpsyde-woocommerce-lifecycle-events/src/Hooks/ProductHooks.php on line 167
- The topic ‘PHP Fatal error when clicking Update on certain products’ is closed to new replies.