wp_wc_order_stats
StaticStores order records and related transaction data.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| order_id | bigint(20) unsigned | NO |
| parent_id | bigint(20) unsigned | NO |
| date_created | datetime | NO |
| date_created_gmt | datetime | NO |
| date_paid | datetime | YES |
| date_completed | datetime | YES |
| num_items_sold | int(11) | NO |
| total_sales | double | NO |
| tax_total | double | NO |
| shipping_total | double | NO |
| net_total | double | NO |
| returning_customer | tinyint(1) | YES |
| status | varchar(20) | NO |
| customer_id | bigint(20) unsigned | NO |
CREATE TABLE Statement
CREATE TABLE wp_wc_order_stats ( order_id bigint(20) unsigned NOT NULL, parent_id bigint(20) unsigned DEFAULT 0 NOT NULL, date_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, date_created_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, date_paid datetime DEFAULT '0000-00-00 00:00:00', date_completed datetime DEFAULT '0000-00-00 00:00:00', num_items_sold int(11) DEFAULT 0 NOT NULL, total_sales double DEFAULT 0 NOT NULL, tax_total double DEFAULT 0 NOT NULL, shipping_total double DEFAULT 0 NOT NULL, net_total double DEFAULT 0 NOT NULL, returning_customer tinyint(1) DEFAULT NULL, status varchar(20) NOT NULL, customer_id bigint(20) unsigned NOT NULL" . ( $should_have_fulfillment_column ? ', fulfillment_status varchar(50) DEFAULT NULL' : '' ) . ', PRIMARY KEY (order_id), KEY date_created (date_created), KEY customer_id (customer_id), KEY status (status)' . ( $should_have_fulfillment_column ? ', KEY fulfillment_status (fulfillment_status)' : '' ) . ", KEY idx_date_paid_status_parent (date_paid, status, parent_id) ) $collate;"; } /** * Delete obsolete notes. */ public static function delete_obsolete_notes() { global $wpdb; $obsolete_notes_names = array( 'wc-admin-welcome-note', 'wc-admin-insight-first-product-and-payment', 'wc-admin-store-notice-setting-moved', 'wc-admin-store-notice-giving-feedback', 'wc-admin-first-downloadable-product', 'wc-admin-learn-more-about-product-settings', 'wc-admin-adding-and-managing-products', 'wc-admin-onboarding-profiler-reminder', 'wc-admin-historical-data', 'wc-admin-manage-store-activity-from-home-screen', 'wc-admin-review-shipping-settings', 'wc-admin-home-screen-feedback', 'wc-admin-update-store-details', 'wc-admin-effortless-payments-by-mollie', 'wc-admin-google-ads-and-marketing', 'wc-admin-insight-first-sale', 'wc-admin-marketing-intro', 'wc-admin-draw-attention', 'wc-admin-welcome-to-woocommerce-for-store-users', 'wc-admin-need-some-inspiration', 'wc-admin-choose-niche', 'wc-admin-start-dropshipping-business', 'wc-admin-filter-by-product-variations-in-reports', 'wc-admin-learn-more-about-variable-products', 'wc-admin-getting-started-ecommerce-webinar', 'wc-admin-navigation-feedback', 'wc-admin-navigation-feedback-follow-up', 'wc-admin-set-up-additional-payment-types', 'wc-admin-deactivate-plugin', 'wc-admin-complete-store-details', 'wc-admin-choosing-a-theme', );Safe to delete?
If you have uninstalled WooCommerce, this table is generally safe to remove. However, always back up your database first.
Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.
How to remove this table
DROP TABLE IF EXISTS `wp_wc_order_stats`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from WooCommerce