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

unable to update a product

Open Irfan-Ahmad-byte opened this issue 2 years ago • 3 comments

I am trying to update products in my store. But, the put/post methods do not work at all. The requests are executed but there are no changes in the product's properties. I gave my homepage URL as the url param, and the permalink in the wordpress is set to something like https://my-website.co.il/year/month/day/sample-post/. below is the constructor defined wcapi = API( url=STORE, consumer_key=DEV, consumer_secret=SECRET, wp_api=True, version="wc/v2", query_string_auth=True ) and here is how I update a product wcapi.put("products/4713", data={'price':'0.15'}).json()

and then it returns the product with old price.

Actually, the product is not updated and still it does not give an error.

Irfan-Ahmad-byte avatar Dec 16 '22 11:12 Irfan-Ahmad-byte

v2 is old try using v3 and to filter use params in the place of data

Vincenzoferrara avatar Feb 10 '23 17:02 Vincenzoferrara

thank

Irfan-Ahmad-byte avatar Feb 21 '23 10:02 Irfan-Ahmad-byte

remember that if you solved it, close the post and publish the solution

Vincenzoferrara avatar Mar 11 '23 09:03 Vincenzoferrara