Automattic\WooCommerce\Internal\Utilities

DatabaseUtil::fts_index_on_order_address_table_exists()publicWC 1.0

Check if fulltext index with key order_addresses_fts on order address table exists.

Метод класса: DatabaseUtil{}

Хуков нет.

Возвращает

true|false.

Использование

$DatabaseUtil = new DatabaseUtil();
$DatabaseUtil->fts_index_on_order_address_table_exists(): bool;

Код DatabaseUtil::fts_index_on_order_address_table_exists() WC 9.3.3

public function fts_index_on_order_address_table_exists(): bool {
	global $wpdb;
	$address_table = $wpdb->prefix . 'wc_order_addresses';
	// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $address_table is hardcoded.
	return ! empty( $wpdb->get_results( "SHOW INDEX FROM $address_table WHERE Key_name = 'order_addresses_fts'" ) );
}