Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stock status type missing some string values #97

Open
RyanWarner opened this issue Mar 28, 2023 · 1 comment
Open

Stock status type missing some string values #97

RyanWarner opened this issue Mar 28, 2023 · 1 comment

Comments

@RyanWarner
Copy link

I'm working on an "Add to cart" button. I want to conditionally change that to be a non-interactive element when my product is out of stock.

While doing this I ran into what I believe is a type issue with stock status: it's missing in_stock and out_of_stock

https://github.com/swellstores/swell-js/blob/master/types/product/snake.d.ts#L164

stock_status?: 'available' | 'preorder' | 'backorder';

Here is a snippet the object as returned by Swell JS:

Screen Shot 2023-03-28 at 8 59 22 AM

@awwit
Copy link
Contributor

awwit commented Apr 4, 2023

@RyanWarner a fix for this issue is available in version 3.21.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants