Title: Plugin Causes Critical Error
Last modified: February 4, 2020

---

# Plugin Causes Critical Error

 *  [IntownWebPros](https://wordpress.org/support/users/kjcc/)
 * (@kjcc)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-critical-error/)
 * When I try to edit a table, I receive the following notice:
 * There has been a critical error on your website. Please check your site admin
   email inbox for instructions.
 * When I check my debug log, I see the following:
 *     ```
       wp_redirect()
       wp-content/plugins/wc-product-table-lite/main.php:206
       ```
   
 * Line 206 is the 11th line in the following passage (the line that begins with
   wp_redirect):
 *     ```
       /* redirect to table editor */
       add_action('plugins_loaded', 'wcpt_redirect_to_table_editor');
       function wcpt_redirect_to_table_editor( ) {
         global $pagenow;
   
         // edit
         if($pagenow == 'post.php' && isset($_GET['post']) && isset($_GET['action']) && $_GET['action'] == 'edit'){
           $post_id = (int) $_GET['post'];
           $post = get_post_type( $post_id );
           if($post === 'wc_product_table'){
             wp_redirect( admin_url( '/edit.php?post_type=wc_product_table&page=wcpt-edit&post_id=' . $post_id ) );
             exit;
           }
         }
       ```
   
 * I have no problem creating new table or rendering the tables on live pages. The
   only issue is editing tables. Please advise.

Viewing 1 replies (of 1 total)

 *  Plugin Author [WC Product Table](https://wordpress.org/support/users/wcproducttable/)
 * (@wcproducttable)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-critical-error/#post-12398444)
 * Hi,
 * Thank you for writing in with your query.
 * This is the first time I am receiving a report of a critical error due to ‘wp_redirect’,
   which is a standard wp function and normally does not cause any issue in the 
   script. That is, unless the plugin is conflicting with another module on your
   site – plugin / theme / custom code / server setting.
 * Since this issue is unique to your site I will need further information about
   it to resolve this issue. Please write in to [wcproducttable@gmail.com](https://wordpress.org/support/topic/plugin-causes-critical-error/wcproducttable@gmail.com?output_format=md)
   to discuss further.
 * Regards,
    Kartik

Viewing 1 replies (of 1 total)

The topic ‘Plugin Causes Critical Error’ is closed to new replies.

 * ![](https://ps.w.org/wc-product-table-lite/assets/icon-256x256.png?rev=3370649)
 * [Product Table & List Builder for WooCommerce](https://wordpress.org/plugins/wc-product-table-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-product-table-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-product-table-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-product-table-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-product-table-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-product-table-lite/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [WC Product Table](https://wordpress.org/support/users/wcproducttable/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/plugin-causes-critical-error/#post-12398444)
 * Status: not resolved