• Resolved kersavond

    (@kersavond)


    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:1083
    

    It 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hey! That would be an issue inside the wp-html-mail-woocommerce plugin. Have you reached out to their support team?

    Thread Starter kersavond

    (@kersavond)

    Thanks for your feedback!

    You’re right — the error was triggered by the wp-html-mail-woocommerce plugin, but the root cause turned out to be corrupted or missing metadata in a product image.

    I tried re-selecting the image via the media manager, but the image information was clearly missing. After flushing the object cache, the image became visible again and everything worked as expected.

    So while the plugin surfaced the error, the underlying issue was related to cached data.

    I’ve done some more research and noticed that the Pro version of the object cache plugin seems to offer better stability — including features like asynchronous flushing and health checks for WooCommerce. Would you say it’s worth the upgrade in this context?

    Plugin Author Till Krüss

    (@tillkruess)

    If you run a WooCommerce site, I’d always use Object Cache Pro over the free version, just for reliability and stability.

    Thread Starter kersavond

    (@kersavond)

    ok thanks, will check this.

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

The topic ‘PHP Error within WooCommerce – fixed after clearing object cache’ is closed to new replies.