Codeinwp / Codeinwp/woocommerce-product-addon

Stock field in Image Dropdown disappears after saving

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

Nobody has claimed this yet.

bug customer report small
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
  1. Go to the meta field group
  2. Insert image dropdown
  3. Switch to the Add Images tab
  4. Insert a number in the stock field
  5. 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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.