low_stock_amount is string

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

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.

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


Dominant language
Python
Stars
216
Forks
108
Avg merge
6h 34m
Merged PRs (30d)
1

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.

More from woocommerce/wc-api-python

All issues in woocommerce/wc-api-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.