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

cannot update products/categories

Open abigoroth opened this issue 4 years ago • 0 comments

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

abigoroth avatar Dec 12 '21 11:12 abigoroth