Automattic\WooCommerce\Internal\ProductAttributesLookup
LookupDataStore::lookup_table_has_data()
Check if the lookup table contains any entry at all.
Метод класса: LookupDataStore{}
Хуков нет.
Возвращает
true|false
. True if the table contains entries, false if the table is empty.
Использование
$LookupDataStore = new LookupDataStore(); $LookupDataStore->lookup_table_has_data(): bool;
Код LookupDataStore::lookup_table_has_data() LookupDataStore::lookup table has data WC 7.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; }