{"id":12398274,"date":"2020-02-04T16:01:24","date_gmt":"2020-02-04T16:01:24","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/plugin-causes-critical-error\/"},"modified":"2020-02-04T16:01:24","modified_gmt":"2020-02-04T16:01:24","slug":"plugin-causes-critical-error","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/plugin-causes-critical-error\/","title":{"rendered":"Plugin Causes Critical Error"},"content":{"rendered":"<p>When I try to edit a table, I receive the following notice:<\/p>\n<p>There has been a critical error on your website. Please check your site admin email inbox for instructions.<\/p>\n<p>When I check my debug log, I see the following:<\/p>\n<pre><code>wp_redirect()\nwp-content\/plugins\/wc-product-table-lite\/main.php:206<\/code><\/pre>\n<p>Line 206 is the 11th line in the following passage (the line that begins with wp_redirect):<\/p>\n<pre><code>\/* redirect to table editor *\/\nadd_action(&#039;plugins_loaded&#039;, &#039;wcpt_redirect_to_table_editor&#039;);\nfunction wcpt_redirect_to_table_editor( ) {\n  global $pagenow;\n\n  \/\/ edit\n  if($pagenow == &#039;post.php&#039; &amp;&amp; isset($_GET[&#039;post&#039;]) &amp;&amp; isset($_GET[&#039;action&#039;]) &amp;&amp; $_GET[&#039;action&#039;] == &#039;edit&#039;){\n    $post_id = (int) $_GET[&#039;post&#039;];\n    $post = get_post_type( $post_id );\n    if($post === &#039;wc_product_table&#039;){\n      wp_redirect( admin_url( &#039;\/edit.php?post_type=wc_product_table&amp;page=wcpt-edit&amp;post_id=&#039; . $post_id ) );\n      exit;\n    }\n  }<\/code><\/pre>\n<p>I have no problem creating new table or rendering the tables on live pages. The only issue is editing tables. Please advise.<\/p>\n","protected":false},"template":"","class_list":["post-12398274","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12398274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12398274\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12398274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}