Automattic\WooCommerce\Database\Migrations
TableMigrator::maybe_add_insert_or_update_error()
Check if the amount of processed database rows matches the amount of orders to process, and log an error if not.
Метод класса: TableMigrator{}
Хуков нет.
Возвращает
null
. Ничего (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() TableMigrator::maybe add insert or update error WC 9.3.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" ); } }