Automattic\WooCommerce\Internal\ProductAttributesLookup

LookupDataStore::lookup_table_has_data()publicWC 1.0

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() WC 8.7.0

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;
}