Automattic\WooCommerce\Database\Migrations
MetaToCustomTableMigrator::verify_migrated_data()
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() MetaToCustomTableMigrator::verify migrated data WC 8.1.1
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 ); $results = $this->fill_source_metadata( $results, $source_ids ); return $this->verify_data( $results ); }