diff --git a/plugins/woocommerce/changelog/fix-k6-api-batch-orders b/plugins/woocommerce/changelog/fix-k6-api-batch-orders new file mode 100644 index 00000000000..f3489683645 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-k6-api-batch-orders @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +skip k6 batch update when batch create fails diff --git a/plugins/woocommerce/tests/performance/requests/api/orders.js b/plugins/woocommerce/tests/performance/requests/api/orders.js index f832fcc696a..26ca0fb6a98 100644 --- a/plugins/woocommerce/tests/performance/requests/api/orders.js +++ b/plugins/woocommerce/tests/performance/requests/api/orders.js @@ -186,6 +186,10 @@ export function ordersAPI() { group( 'API Batch Update Orders', function () { let updateBatchItem; + if ( ! post_ids ) { + return; + } + for ( let index = 0; index < batchSize; index++ ) { updateBatchItem = { id: `${ post_ids[ index ] }`,