Fix imported variations count on batched import. (#41187)

Co-authored-by: Juan de Paco <juan.d@onthegosystems.com>
This commit is contained in:
Juan de Paco Moreno 2023-11-08 16:11:57 +01:00 committed by GitHub
parent 762f6847e5
commit b608d0e79e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Import variations count fails when importing more than 30 products

View File

@ -303,12 +303,13 @@ class WC_Admin_Importers {
} else {
wp_send_json_success(
array(
'position' => $importer->get_file_position(),
'percentage' => $percent_complete,
'imported' => count( $results['imported'] ),
'failed' => count( $results['failed'] ),
'updated' => count( $results['updated'] ),
'skipped' => count( $results['skipped'] ),
'position' => $importer->get_file_position(),
'percentage' => $percent_complete,
'imported' => count( $results['imported'] ),
'imported_variations' => count( $results['imported_variations'] ),
'failed' => count( $results['failed'] ),
'updated' => count( $results['updated'] ),
'skipped' => count( $results['skipped'] ),
)
);
}