PostsToOrdersMigrationController::verify_transaction_isolation_level()privateWC 1.0

Verify that a given database transaction isolation level name is valid, and throw an exception if not.

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

No Hooks.


null. Nothing.


// private - for code of main (parent) class only
$result = $this->verify_transaction_isolation_level( $transaction_isolation_level ): void;
$transaction_isolation_level(string) (required)
Transaction isolation level name to check.

Code of PostsToOrdersMigrationController::verify_transaction_isolation_level() WC 7.1.0

private function verify_transaction_isolation_level( string $transaction_isolation_level ): void {
	if ( ! in_array( $transaction_isolation_level, CustomOrdersTableController::get_valid_transaction_isolation_levels(), true ) ) {
		throw new \Exception( 'Invalid database transaction isolation level name ' . $transaction_isolation_level );