WC_Install::get_missing_base_tables
Get the names of any missing WooCommerce base tables.
Unlike verify_base_tables(), this method has no side effects: it only inspects the database and reports which required tables are missing.
Метод класса: WC_Install{}
Хуков нет.
Возвращает
string[]. List of missing table names.
Использование
$result = WC_Install::get_missing_base_tables(): array;
Список изменений
| С версии 11.0.0 | Введена. |
Код WC_Install::get_missing_base_tables() WC Install::get missing base tables WC 11.2.2
public static function get_missing_base_tables(): array {
$schema = self::get_schema();
$hpos_settings = filter_var_array(
array(
'cot' => get_option( CustomOrdersTableController::CUSTOM_ORDERS_TABLE_USAGE_ENABLED_OPTION ),
'data_sync' => get_option( DataSynchronizer::ORDERS_DATA_SYNC_ENABLED_OPTION ),
),
array(
'cot' => FILTER_VALIDATE_BOOLEAN,
'data_sync' => FILTER_VALIDATE_BOOLEAN,
)
);
if ( in_array( true, $hpos_settings, true ) ) {
$schema .= wc_get_container()
->get( OrdersTableDataStore::class )
->get_database_schema();
}
return wc_get_container()
->get( DatabaseUtil::class )
->get_missing_tables( $schema );
}