Automattic\WooCommerce\Internal\ProductAttributesLookup
LookupDataStore::check_lookup_table_exists()
Check if the lookup table exists in the database.
Метод класса: LookupDataStore{}
Хуков нет.
Возвращает
true|false
.
Использование
$LookupDataStore = new LookupDataStore(); $LookupDataStore->check_lookup_table_exists();
Код LookupDataStore::check_lookup_table_exists() LookupDataStore::check lookup table exists WC 8.3.1
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 ); }