{"table_name":"wc_order_stats","full_table_name":"wp_wc_order_stats","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"medium","create_sql":"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. * * @return void */ 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', );","columns":[{"name":"order_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"parent_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"date_created","type":"datetime","nullable":false,"primary_key":false},{"name":"date_created_gmt","type":"datetime","nullable":false,"primary_key":false},{"name":"date_paid","type":"datetime","nullable":true,"primary_key":false},{"name":"date_completed","type":"datetime","nullable":true,"primary_key":false},{"name":"num_items_sold","type":"int(11)","nullable":false,"primary_key":false},{"name":"total_sales","type":"double","nullable":false,"primary_key":false},{"name":"tax_total","type":"double","nullable":false,"primary_key":false},{"name":"shipping_total","type":"double","nullable":false,"primary_key":false},{"name":"net_total","type":"double","nullable":false,"primary_key":false},{"name":"returning_customer","type":"tinyint(1)","nullable":true,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"customer_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false}],"plugin":{"slug":"woocommerce","name":"WooCommerce","active_installs":7000000,"version":"10.7.0","wp_org_url":"https://wordpress.org/plugins/woocommerce/"}}