Automattic\WooCommerce\Internal\DataStores\Orders
DataSynchronizer::check_orders_table_exists
Does the custom orders tables exist in the database?
Метод класса: DataSynchronizer{}
Хуков нет.
Возвращает
bool. True if the custom orders tables exist in the database.
Использование
$DataSynchronizer = new DataSynchronizer(); $DataSynchronizer->check_orders_table_exists(): bool;
Код DataSynchronizer::check_orders_table_exists() DataSynchronizer::check orders table exists WC 11.1.0
public function check_orders_table_exists(): bool {
$missing_tables = $this->database_util->get_missing_tables( $this->data_store->get_database_schema() );
if ( count( $missing_tables ) === 0 ) {
update_option( self::ORDERS_TABLE_CREATED, 'yes' );
return true;
} else {
update_option( self::ORDERS_TABLE_CREATED, 'no' );
return false;
}
}