WC_Install::get_tables
Return a list of WooCommerce tables. Used to make sure all WC tables are dropped when uninstalling the plugin in a single site or multi site environment.
Method of the class: WC_Install{}
Hooks from the method
Returns
Array. WC tables.
Usage
$result = WC_Install::get_tables();
WC_Install::get_tables() WC Install::get tables code WC 10.3.3
public static function get_tables() {
global $wpdb;
$tables = array(
"{$wpdb->prefix}wc_download_log",
"{$wpdb->prefix}wc_product_download_directories",
"{$wpdb->prefix}wc_product_meta_lookup",
"{$wpdb->prefix}wc_tax_rate_classes",
"{$wpdb->prefix}wc_webhooks",
"{$wpdb->prefix}woocommerce_api_keys",
"{$wpdb->prefix}woocommerce_attribute_taxonomies",
"{$wpdb->prefix}woocommerce_downloadable_product_permissions",
"{$wpdb->prefix}woocommerce_log",
"{$wpdb->prefix}woocommerce_order_itemmeta",
"{$wpdb->prefix}woocommerce_order_items",
"{$wpdb->prefix}woocommerce_payment_tokenmeta",
"{$wpdb->prefix}woocommerce_payment_tokens",
"{$wpdb->prefix}woocommerce_sessions",
"{$wpdb->prefix}woocommerce_shipping_zone_locations",
"{$wpdb->prefix}woocommerce_shipping_zone_methods",
"{$wpdb->prefix}woocommerce_shipping_zones",
"{$wpdb->prefix}woocommerce_tax_rate_locations",
"{$wpdb->prefix}woocommerce_tax_rates",
"{$wpdb->prefix}wc_reserved_stock",
"{$wpdb->prefix}wc_rate_limits",
"{$wpdb->prefix}wc_product_attributes_lookup",
"{$wpdb->prefix}wc_stock_notifications",
"{$wpdb->prefix}wc_stock_notificationmeta",
// WCA Tables.
"{$wpdb->prefix}wc_order_stats",
"{$wpdb->prefix}wc_order_product_lookup",
"{$wpdb->prefix}wc_order_tax_lookup",
"{$wpdb->prefix}wc_order_coupon_lookup",
"{$wpdb->prefix}wc_admin_notes",
"{$wpdb->prefix}wc_admin_note_actions",
"{$wpdb->prefix}wc_customer_lookup",
"{$wpdb->prefix}wc_category_lookup",
"{$wpdb->prefix}wc_order_fulfillments",
"{$wpdb->prefix}wc_order_fulfillment_meta",
// HPOS.
"{$wpdb->prefix}wc_orders",
"{$wpdb->prefix}wc_order_addresses",
"{$wpdb->prefix}wc_order_operational_data",
"{$wpdb->prefix}wc_orders_meta",
);
/**
* Filter the list of known WooCommerce tables.
*
* If WooCommerce plugins need to add new tables, they can inject them here.
*
* @param array $tables An array of WooCommerce-specific database table names.
* @since 3.4.0
*/
$tables = apply_filters( 'woocommerce_install_get_tables', $tables );
return $tables;
}