wc-api-java icon indicating copy to clipboard operation
wc-api-java copied to clipboard

unable to update product using update method

Open yogesh9239 opened this issue 4 years ago • 0 comments

I am trying to update product prices but i got "HttpResponseProxy{HTTP/1.1 400 Bad Request [Date: Sat, 06 Jun 2020 21:40:45 GMT" HttpResponse and got result from mapper.readValue is "{errors=[{code=woocommerce_api_missing_product_data, message=No product data specified to edit product}]}", below are the values which i trying to update-

          Map<String, Object> params = new HashMap<>();
       params.put("price", "151.00");
       params.put("regular_price", "200.51");
      
        Map products = wooCommerce.update(EndpointBaseType.PRODUCTS.getValue(), 41064 , params);

yogesh9239 avatar Jun 06 '20 21:06 yogesh9239