TableMigrator::maybe_add_insert_or_update_error()protectedWC 1.0

Check if the amount of processed database rows matches the amount of orders to process, and log an error if not.

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

Хуков нет.


null. Ничего.


// protected - в коде основоного (родительского) или дочернего класса
$result = $this->maybe_add_insert_or_update_error( $operation, $received_rows_count );
$operation(строка) (обязательный)
Operation performed, 'insert' or 'update'.
$received_rows_count(массив|true|false) (обязательный)
Value returned by @wpdb after executing the query.

Код TableMigrator::maybe_add_insert_or_update_error() WC 7.5.1

protected function maybe_add_insert_or_update_error( string $operation, $received_rows_count ) {
	if ( false === $received_rows_count ) {
		$this->add_error( "$operation operation didn't complete, the database query failed" );