• Resolved Marisa

    (@marisa2023)


    Currently Woocommerce works fine on my site for PHP 8.4.

    I switched to PHP 8.5 and my site generated a fatal error.

    I would like to know if there is due to my website or due to Woocommerce? Do other people suffer a fatal error when they switch from PHP 8.4 to 8.5?

    Here is the stack trace with the error.

    Error Details

    An error of type E_ERROR was caused in line 79 of the file /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php. Error message: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, string given in /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php:79
    Stack trace: 0 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/wc-attribute-functions.php(79): array_filter() 1 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/src/Internal/ProductAttributes/VisualAttributeTermAdmin.php(37): wc_get_attribute_taxonomies() 2 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/class-woocommerce.php(428): Automattic\WooCommerce\Internal\ProductAttributes\VisualAttributeTermAdmin->register() 3 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/class-woocommerce.php(281): WooCommerce->init_hooks() 4 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/includes/class-woocommerce.php(182): WooCommerce->__construct() 5 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/woocommerce.php(55): WooCommerce::instance() 6 /home/myusername/public_html/mywebsite.com/wp-content/plugins/woocommerce/woocommerce.php(70): WC() 7 /home/myusername/public_html/mywebsite.com/wp-settings.php(597): include_once(‘/home/myusername…’) 8 /home/myusername/public_html/mywebsite.com/wp-config.php(220): require_once(‘/home/myusername…’) 9 /home/myusername/public_html/mywebsite.com/wp-load.php(50): require_once(‘/home/myusername…’) 10 /home/myusername/public_html/mywebsite.com/wp-admin/admin.php(35): require_once(‘/home/myusername…’) 11 {main}

    thrown

Viewing 1 replies (of 1 total)
  • Thread Starter Marisa

    (@marisa2023)

    Woocommerce is now working with php 8.5. To make it work I cleared my woocommerce and all wordpress transients. I also temporarily turned off the Redis cache. Now the cache is flushed and turned back on it still works with php 8.5. It must have been a stale value somewhere.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.