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.
Return
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 9.5.1
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; }