Home > OS >  WordPress error_log filling up with SQL errors
WordPress error_log filling up with SQL errors

Time:12-19

Should I create this table or it could be an error fixable in some other way? Every time I search a customer number I get one of these errors in error_log within the WordPress document root. I need some help in debugging this please I am in panic mode:

[16-Dec-2022 14:12:35 UTC] WordPress database error Table 'store_wp557.wp_wc_customer_lookup' doesn't exist for query SELECT SUM(wps.total_sales) 
                            FROM `wp_wc_customer_lookup` AS wpl 
                            JOIN `wp_wc_order_stats` as wps ON wpl.customer_id = wps. customer_id 
                            WHERE wpl.user_id=122442
         made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Form_Handler::process_login, wp_signon, do_action('wp_login'), WP_Hook->do_action, WP_Hook->apply_filters, XLWCTY_Common::update_user_order_count, XLWCTY_Common::get_customer_total_spent

CodePudding user response:

You can go to the WooCommerce -> Status -> Tools page in the backend then you'll find the Verify base database tables tool.

Click on the Verify database button it will validate and recreate the missing base tables of WooCommerce.

You'll also see the Update database tool click the Update database button and all the databases will be updated to the latest version of WooCommerce.

Note: Make sure you have a full backup of the site and database before running those tools. otherwise, you might lose the data if something goes wrong.

  • Related