XiaoFaye / WooCommerce.NET

A .NET Wrapper for WooCommerce/WordPress REST API
MIT License
391 stars 217 forks source link

Can't update product price #743

Closed tiziana-git closed 1 year ago

tiziana-git commented 1 year ago

With this code I can update name and description, but price won't update, even if i set it to 10

        Dim oProdMod As List(Of Product) = Await wc.Product.GetAll(oParProd)
        If oProdMod.Count > 0 Then
            With oProdMod(0)
                .name = "title01"
                .description = "descr01"
                .regular_price = 10
                .sale_price = 10 
                .price = 10 
            End With
            Dim oRes = Await wc.Product.Update(CULng(oProdMod(0).id), oProdMod(0))

End If

tiziana-git commented 1 year ago

I have found that the product is a variant product so the price shown on backoffice are the variant's prices