Problems with PHP 8: “TypeError thrown” and “SyntaxError: JSON.parse”
-
Has the WPC Product Bundles for WooCommerce v6.3.3 plugin been tested with PHP 8?
I have an up-to-date WordPress site that I’ve upgraded to PHP 8.1 and now we’re seeing some strange WooCommerce order problems but only when there is a BUNDLE in the cart.
When a user places an order with a bundle and pays with PayPal, the PayPal part goes fine, but when they return to our website, the order is not marked as paid, the item is still in the cart, and this error message is in the middle of the page:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
And when we tried to mark a “Paid by Check” order with a bundle in it as “Completed” in the WooCommerce backend, we get a white screen with the text:
TypeError thrown
Unsupported operand types: int + stringNeither of these problems occur if we use PHP 8.1 and non-bundle product. Neither of these problems occur if we use PHP 7.4 and a bundle product. So it seems that bundles with PHP 8.1 are the problem.
If I can provide any more details, please let me know, but I didn’t find anything obvious in error_log or debug.log. Thanks in advance for your help (and a wonderful plugin)!
The page I need help with: [log in to see the link]
- The topic ‘Problems with PHP 8: “TypeError thrown” and “SyntaxError: JSON.parse”’ is closed to new replies.