woocommerce / woocommerce/wc-api-python
low_stock_amount is string
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 216
- Forks
- 108
- Avg merge
- 6h 34m
- Merged PRs (30d)
- 1
Description
Issue summary
When I fetch a WooCommerce product using this API, the variable low_stock_amount is an empty string, I believe should be an integer '0'.
Expected behavior
Always return an integer. or a 0
Actual behavior
It returns an empty string.
Steps to reproduce the problem
response = wcapi.get('products', params={'sku':sku}).json()print(response)
##Related bug
I believe this is a related bug
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the documented wcapi.get('products', params={'sku': sku}).json() request and inspect where low_stock_amount is represented in the returned product data. Done means the field is consistently returned as an integer, using 0 when the current response contains an empty string.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100