PHP Error within WooCommerce – fixed after clearing object cache
-
Hi everyone,
Thanks for the amazing plugin – we’ve been using it with WooCommerce since April, and it really improved our website performance.
Today, for the first time, we encountered a PHP error:
Uncaught TypeError: current(): Argument #1 ($array) must be of type array, false given in /wp-html-mail-woocommerce/includes/class-wphtmlmail-woocommerce.php:1083It only happened with one specific order and was caused by a broken product image assigned to a product variation. Re-assigning the image didn’t work – the issue remained.
The fix was simple: clearing the object cache solved the problem.
Is there a way to prevent these kinds of issues in the future? I’m guessing some outdated or corrupted data got stuck in the cache.
Thanks!
Hosting: cPanel-based shared hosting
PHP: 8.4
Redis: 6.2.16
Page Cache Plugin: AccelerateWP Version 3.19.0.1-1.1-27
The topic ‘PHP Error within WooCommerce – fixed after clearing object cache’ is closed to new replies.