woocommerce / wc-api-ruby

A Ruby wrapper for the WooCommerce API.
MIT License
69 stars 73 forks source link

cannot update products/categories #54

Open abigoroth opened 2 years ago

abigoroth commented 2 years ago
irb(main):038:0> tmp.parsed_response["product_categories"].map{|x| "#{x["id"]} #{x["description"]}" }
=> ["15 ", "34 ", "31 ", "33 ", "32 ", "35 ", "36 ", "37 All kinds of clothes.", "38 "]
irb(main):039:0> tmp = woocommerce.put("products/categories/37", {id: 37, description: "xxx All kinds of clothes.xxxx" }).parsed_response
=> {"errors"=>[{"code"=>"woocommerce_api_missing_product_category", "message"=>"No product_category data specified to edit product_category"}]}

also tried with tmp = woocommerce.put("products/categories/37", { description: "xxx All kinds of clothes.xxxx" }).parsed_response resulted no success.

the documentation says it should be: image

please advice