woocommerce / wc-api-python

A Python wrapper for the WooCommerce API.
https://pypi.org/project/WooCommerce/
MIT License
213 stars 113 forks source link

unable to update a product #84

Open Irfan-Ahmad-byte opened 1 year ago

Irfan-Ahmad-byte commented 1 year ago

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.

Vincenzoferrara commented 1 year ago

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

Irfan-Ahmad-byte commented 1 year ago

thank

Vincenzoferrara commented 1 year ago

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