Automattic\WooCommerce\Internal\ProductAttributesLookup
LookupDataStore::check_lookup_table_exists
Check if the lookup table exists in the database.
Method of the class: LookupDataStore{}
No Hooks.
Returns
true|false.
Usage
$LookupDataStore = new LookupDataStore(); $LookupDataStore->check_lookup_table_exists();
LookupDataStore::check_lookup_table_exists() LookupDataStore::check lookup table exists code WC 10.6.2
public function check_lookup_table_exists() {
global $wpdb;
$query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $this->lookup_table_name ) );
// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
return $this->lookup_table_name === $wpdb->get_var( $query );
}