Automattic\WooCommerce\Internal\Admin

CategoryLookup::define_category_lookup_tables_in_wpdb()public staticWC 1.0

Add category lookup table to $wpdb object.

Method of the class: CategoryLookup{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = CategoryLookup::define_category_lookup_tables_in_wpdb();

CategoryLookup::define_category_lookup_tables_in_wpdb() code WC 8.7.0

public static function define_category_lookup_tables_in_wpdb() {
	global $wpdb;

	// List of tables without prefixes.
	$tables = array(
		'wc_category_lookup' => 'wc_category_lookup',
	);

	foreach ( $tables as $name => $table ) {
		$wpdb->$name    = $wpdb->prefix . $table;
		$wpdb->tables[] = $table;
	}
}