Fix inventory sync for variable products when sync is enabled through quick or bulk edit. #264
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
As reported in #262, when marking a variable product as synced with Square via quick or bulk edit, if the variable product has stock management enabled at the parent level and one of its variations does not have
manage stock
enabled at the child level, the inventory syncs incorrectly with Square. Upon investigation, I found this occurs because themanage stock
setting is not updated tofalse
during quick or bulk edits, unlike when updating a product from the product edit page. This PR ensures thatmanage stock
is set tofalse
for the parent variable product when it is marked as synced with Square via quick or bulk edit and inventory sync is enabled. This change ensures consistent behavior and fixes the inventory sync issue.Closes #262
Steps to test the changes in this Pull Request:
Changelog entry