Automattic\WooCommerce\Internal\ProductAttributesLookup
LookupDataStore::lookup_table_has_data
Check if the lookup table contains any entry at all.
Method of the class: LookupDataStore{}
No Hooks.
Returns
true|false. True if the table contains entries, false if the table is empty.
Usage
$LookupDataStore = new LookupDataStore(); $LookupDataStore->lookup_table_has_data(): bool;
LookupDataStore::lookup_table_has_data() LookupDataStore::lookup table has data code WC 10.3.6
public function lookup_table_has_data(): bool {
global $wpdb;
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
return ( (int) $wpdb->get_var( "SELECT EXISTS (SELECT 1 FROM {$this->lookup_table_name})" ) ) !== 0;
}