Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::check_orders_table_exists()publicWC 1.0

Does the custom orders tables exist in the database?

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

Хуков нет.

Возвращает

true|false. True if the custom orders tables exist in the database.

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

$DataSynchronizer = new DataSynchronizer();
$DataSynchronizer->check_orders_table_exists(): bool;

Код DataSynchronizer::check_orders_table_exists() WC 8.7.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;
	}
}