• Resolved johnlopu

    (@johnlopu)


    When I switch to PHP 8.0.2 (WooCommerce 5.1.0 WordPress 5.7) I get this Fatal error:

    
    Fatal error: Uncaught ValueError: Missing format specifier at end of string in /var/www/clients/client309/web3882/web/mysite.com/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:226 Stack trace: #0 /var/www/clients/client309/web3882/web/mysite.com/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(226): sprintf() #1 /var/www/clients/client309/web3882/web/mysite.com/wp-includes/class-wp-hook.php(292): WC_Post_Types::register_taxonomies() #2 /var/www/clients/client309/web3882/web/mysite.com/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #3 /var/www/clients/client309/web3882/web/mysite.com/wp-includes/plugin.php(484): WP_Hook->do_action() #4 /var/www/clients/client309/web3882/web/mysite.com/wp-settings.php(560): do_action() #5 /var/www/clients/client309/web3882/web/mysite.com/wp-config.php(61): require_once('...') #6 /var/www/clients/client309/web3882/web/mysite.com/wp-load.php(37): require_once('...') #7 /var/www/clients/client309/web3882/web/mysite.com/wp-blog-header.php(13): require_once('...') #8 /var/www/clients/client309/web3882/web/mysite.com/index.php(17): require('...') #9 {main} thrown in /var/www/clients/client309/web3882/web/mysite.com/wp-content/plugins/woocommerce/includes/class-wc-post-types.php on line 226
    Es gab einen kritischen Fehler auf deiner Website.
    

    When I switch back to PHP 7.4 the error is gone. Is there an incompatibility of WooCommerce with PHP 8.0.2? Any ideas how to resolve this?

    Thanks!
    – Jolopu

    • This topic was modified 3 years, 11 months ago by Yui. Reason: please use CODE button for code formatting

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi! Thanks for your post.

    WooCommerce core has been thoroughly tested for PHP 8 as you can read in this Github issue. However I’m happy to help look into this.

    Can you please test this with only WooCommerce active (perhaps in a staging site)? And when it’s in that state and if you’re still seeing the error, can you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response. Thanks!

    Thread Starter johnlopu

    (@johnlopu)

    Hi Victoria!

    Thanks for your reply and sorry for double posting. In the meantime I was able to solve the issue myself. It had to do with the WooCommerce language files. I reuploaded them and now everything works. Thanks!

    • This reply was modified 3 years, 11 months ago by johnlopu.

    Glad to hear it – thanks for letting us know!

    This thread is marked as resolved now. If you have any further questions, I recommend creating a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WooCommerce 5.1 PHP 8 Fatal Error’ is closed to new replies.