Codeinwp / Codeinwp/woocommerce-product-addon
Stock field in Image Dropdown disappears after saving
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 15
- Forks
- 9
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 16
Description
Description
While working on a ticket, I encountered a problem with the stock in the Image Dropdown input disappearing after saving the fields.
Additionally, the stock of the images is not correlated with the product stock unless the order is marked as completed. Meaning that users can make a lot of orders even if the product remains out of stock.
ref: https://secure.helpscout.net/conversation/2478792482/400233?viewId=212385
Step-by-step reproduction instructions
- Go to the meta field group
- Insert image dropdown
- Switch to the Add Images tab
- Insert a number in the stock field
- Save the fields and re-open the image dropdown
Screenshots, screen recording, code snippet or Help Scout ticket
After saving the field - https://vertis.d.pr/i/REG9vQ
Before saving the field - https://vertis.d.pr/i/6YJnFF
Environment info
No response
Is the issue you are reporting a regression
No
Contributor guide
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 Image Dropdown stock issue through the meta field group and Add Images tab, then compare the field state before and after saving. Trace where the stock value is persisted and where product stock is checked; done means the saved value remains visible and image stock prevents orders when the product is out of stock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100