I'm trying to update variants of a product with batch update, but it doesn't update anything.
This is my code:
Dim oVarProd As List(Of Variation) = Await wc.Product.Variations.GetAll(CULng(oProdMod(0).id), ParCall)
For iCont As Integer = 0 To oVarProd.Count - 1
oVarProd(iCont).stock_quantity = 1
oVarProd(iCont).price = 10
Next
Dim batchObj As BatchObject(Of Variation) = New BatchObject(Of Variation) With {.update = oVarProd}
Dim RES = Await wc.Product.Variations.UpdateRange(CULng(oProdMod(0).id), batchObj)
Variations inside batchObj has the correct modifyed values
Using the REST API LOG plugin, i can see the message is:
{
"id": 485,
"error": {
"code": "product_invalid_sku",
"message": "COD non valido o duplicato.",
"data": {
"status": 400,
"resource_id": 467
}
}
},
I'm trying to update variants of a product with batch update, but it doesn't update anything. This is my code: Dim oVarProd As List(Of Variation) = Await wc.Product.Variations.GetAll(CULng(oProdMod(0).id), ParCall) For iCont As Integer = 0 To oVarProd.Count - 1 oVarProd(iCont).stock_quantity = 1 oVarProd(iCont).price = 10 Next Dim batchObj As BatchObject(Of Variation) = New BatchObject(Of Variation) With {.update = oVarProd} Dim RES = Await wc.Product.Variations.UpdateRange(CULng(oProdMod(0).id), batchObj)
Variations inside batchObj has the correct modifyed values