Hi there, yesterday we found out, that the REST-API of a client’s ecommerce website was not working. They could GET (200) the orders successfull but when they tried to access the products, the WooCommerce REST-API always returned Error 500. We deactivated all of the plugins, downgraded WooCommerce, switched the SSL-Certificate and after two days we found out: It was PRO (v5)!
This is the Debug-Message we received when we tried to access “/wp-json/wc/v3/products/”:
Fatal error: Uncaught Exception: Unable to load content from post. in /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/content/class-content.php:58 Stack trace: #0 /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/content/class-content.php(28): Cornerstone_Content->load_from_post() #1 /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/element/class-element-front-end.php(208): Cornerstone_Content->__construct() #2 /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/element/class-element-front-end.php(87): Cornerstone_Element_Front_End->get_content() #3 /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/element/class-element-front-end.php(70): Cornerstone_Element_Front_End->render_the_content_cached() #4 /var/www/vhosts/XXX.com/httpdocs/wp-includes/shortcodes.php(356): Cornerstone_Element_Front_End->render_content() #5 [internal function]: do in /var/www/vhosts/XXX.com/httpdocs/wp-content/themes/pro/cornerstone/includes/classes/content/class-content.php on line 58
We downgraded to PRO 4.3.3 and finally everything was working again.
Could somebody tell me what the hell was going on there? I really did not think that a theme could interrupt a WooCommerce REST-API… Is this a bug or is there something wrong in our Server / System?
Looking forward to hearing from you soon.
Best regards from Germany
PS: Im a Themeco ELITE client but i wanted to share this error in public as i could not find anything about it on the internet so far.