You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: