Automattic\WooCommerce\Database\Migrations

MetaToCustomTableMigrator::verify_migrated_data()publicWC 1.0

Verify whether data was migrated properly for given IDs.

{} Это метод класса: MetaToCustomTableMigrator{}

Хуков нет.

Возвращает

Массив. List of IDs along with columns that failed to migrate.

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

$MetaToCustomTableMigrator = new MetaToCustomTableMigrator();
$MetaToCustomTableMigrator->verify_migrated_data( $source_ids ) : array;
$source_ids(массив) (обязательный)
List of source IDs.

Код MetaToCustomTableMigrator::verify_migrated_data() WC 6.8.0

public function verify_migrated_data( array $source_ids ) : array {
	global $wpdb;
	$query = $this->build_verification_query( $source_ids );
	// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $query should already be prepared.
	$results = $wpdb->get_results( $query, ARRAY_A );

	return $this->verify_data( $results );
}