{"id":4978,"date":"2021-02-18T02:44:52","date_gmt":"2021-02-18T02:44:52","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=4978"},"modified":"2021-02-18T02:44:52","modified_gmt":"2021-02-18T02:44:52","slug":"woocommerce-services-php-fatal-error-uncaught-error-cannot-call-constructor-in","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/woocommerce-services-php-fatal-error-uncaught-error-cannot-call-constructor-in","title":{"rendered":"woocommerce-services &#8211; PHP Fatal error: Uncaught Error: Cannot call constructor in"},"content":{"rendered":"<p>Recently a wordpress site crashed after with the error :\u00a0<\/p><pre>[pid 31317] PHP Fatal error: Uncaught Error: Cannot call constructor in \/wp-content\/plugins\/woocommerce-services\/classes\/wc-api-dev\/class-wc-rest-dev-data-continents-controller.php:47\\nStack trace:\\n#0 wp-content\/plugins\/woocommerce-services\/woocommerce-services.php(922): WC_REST_Dev_Data_Continents_Controller-&gt;__construct()\\n#1 wp-includes\/class-wp-hook.php(287): WC_Connect_Loader-&gt;wc_api_dev_init(Object(WP_REST_Server))\\n#2 <br \/>wp-includes\/class-wp-hook.php(311): WP_Hook-&gt;apply_filters(NULL, Array)\\n#3 <br \/>wp-includes\/plugin.php(478): WP_Hook-&gt;do_action(Array)\\n#4 wp-includes\/rest-api.php(506): do_action('rest_api_init', Object(WP_REST_Server))\\n#5<br \/><br \/>\/wp-content\/plugins\/disable-json-api\/classes\/helpers.php(10): rest_get_server()\\n#6 wp-content\/plugins\/disable-json-api\/classes\/helpers.php(36): DRA_Helpers::get_all_rest_routes()\\n#7\u00a0 in wp-content\/plugins\/woocommerce-services\/classes\/wc-api-dev\/class-wc-rest-dev-data-continents-controller.php on line 47, referer: wp-cron.php?doing_wp_cron<\/pre><p>Disabling the woocommerce-services Plugin stopped the error showing<\/p><p>Upgrading Woo-Commerce to version 5.0.0 then re-enabling woocommerce-services Plugin fixed the issue<\/p>","protected":false},"excerpt":{"rendered":"<p>Recently a wordpress site crashed after with the error :\u00a0[pid 31317] PHP Fatal error: Uncaught Error: Cannot call constructor in \/wp-content\/plugins\/woocommerce-services\/classes\/wc-api-dev\/class-wc-rest-dev-data-continents-controller.php:47\\nStack trace:\\n#0 wp-content\/plugins\/woocommerce-services\/woocommerce-services.php(922): WC_REST_Dev_Data_Continents_Controller-&gt;__construct()\\n#1 wp-includes\/class-wp-hook.php(287): WC_Connect_Loader-&gt;wc_api_dev_init(Object(WP_REST_Server))\\n#2 wp-includes\/class-wp-hook.php(311): [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3441,3442,3443],"class_list":["post-4978","post","type-post","status-publish","format-standard","hentry","category-research","tag-php-fatal-error","tag-php7","tag-uncaught-error-cannot-call-constructor-in"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=4978"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4978\/revisions"}],"predecessor-version":[{"id":4979,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/4978\/revisions\/4979"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=4978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=4978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=4978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}