woocommerce / woocommerce/wc-api-python

low_stock_amount is string

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

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

  1. response = wcapi.get('products', params={'sku':sku}).json()
  2. print(response)

##Related bug
I believe this is a related bug


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.