PHP Parse error: woocommerce.php on line 57
-
This message started appearing in cpanel server logs yesterday after updating to v5.8.0. The site is loading on frontend but admin is no longer accessible.
I attempted to re-install v5.7.1 and v5.9.0beta1 but the issue persists. Not sure if it’s something server related but I’m scratching my head.The full error is:
PHP Parse error: syntax error, unexpected ':', expecting '{' in /wp-content/plugins/woocommerce/woocommerce.php on line 57
This corresponds to the following line in woocommerce.php:
function wc_get_container() : \Psr\Container\ContainerInterface {
The admin panel will not load and only brings up a 500 Internal Server Error. The development was being done on PHP80 so I forced the subdomain back to 7.4 via htaccess and verified using health tools and disabling the woocommerce plugin via FTP (the site loads perfectly when WooCommerce is disabled). Unfortunately, this didn’t work either.
EDIT: Frontend is also not working now.
- This topic was modified 3 years, 5 months ago by .
- This topic was modified 3 years, 5 months ago by .
- This topic was modified 3 years, 5 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘PHP Parse error: woocommerce.php on line 57’ is closed to new replies.