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

[Enhancement]: Override stock details if global stock management is used but no variations are created #18

Open
seb86 opened this issue Nov 9, 2023 · 0 comments
Labels
focus: products API This issue/PR is related to the products API. pr: minor Add to a PR to trigger a MINOR version bump when merged. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.

Comments

@seb86
Copy link
Member

seb86 commented Nov 9, 2023

Describe the solution you'd like

It is unlikely a variable product will not have any variations applied but should such a product be published without any, the stock details are not returning correctly should the global stock management be used.

Need to override the following stock values from this:

"stock": {
        "is_in_stock": true,
        "stock_quantity": 5,
        "stock_status": "instock",
        ...
}

to this:

"stock": {
        "is_in_stock": false,
        "stock_quantity": null,
        "stock_status": "outofstock",
		...
}

Describe alternatives you've considered

No response

Additional context

No response

@seb86 seb86 added type: enhancement The issue is a request for an enhancement. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. focus: products API This issue/PR is related to the products API. pr: minor Add to a PR to trigger a MINOR version bump when merged. labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: products API This issue/PR is related to the products API. pr: minor Add to a PR to trigger a MINOR version bump when merged. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant