Automattic\WooCommerce\Internal\Utilities
DatabaseUtil::fts_index_on_order_item_table_exists()
Check if fulltext index with key order_item_fts on order item table exists.
Метод класса: DatabaseUtil{}
Хуков нет.
Возвращает
true|false
.
Использование
$DatabaseUtil = new DatabaseUtil(); $DatabaseUtil->fts_index_on_order_item_table_exists(): bool;
Код DatabaseUtil::fts_index_on_order_item_table_exists() DatabaseUtil::fts index on order item table exists WC 9.3.3
public function fts_index_on_order_item_table_exists(): bool { global $wpdb; $order_item_table = $wpdb->prefix . 'woocommerce_order_items'; // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $order_item_table is hardcoded. return ! empty( $wpdb->get_results( "SHOW INDEX FROM $order_item_table WHERE Key_name = 'order_item_fts'" ) ); }