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

[Inventory Sync] Sync the "Mark as sold out" field value during inventory sync. #21

Open
iamdharmesh opened this issue May 22, 2023 · 7 comments · May be fixed by #277
Open

[Inventory Sync] Sync the "Mark as sold out" field value during inventory sync. #21

iamdharmesh opened this issue May 22, 2023 · 7 comments · May be fixed by #277
Assignees
Labels
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

@iamdharmesh
Copy link
Member

iamdharmesh commented May 22, 2023

Describe the bug

PR #986 has added Support for sync "Inventory tracking", In simple words when inventory tracking is disabled on the square, It unchecks "manage stock?" on Woo side and makes the product "In stock".

At Square side, we can mark the inventory tracking disabled product as "Out of stock" with the "Mark as sold out on Point of Sale and Online" option (However, we are not able to mark it due to some error on the Square side.) but currently, Inventory tracking disabled product imported as "in stock" always regardless of the value of sold_out field.

This issue is created to take the sold_out field into account during inventory syncing. So, if product inventory tracking is disabled then the product stock status won't always be "in stock" on the WooCommerce side, Instead, it will depend on the value of the sold_out field.

Note: The sold_out field of Square API is still in Beta.

Screenshots

Image

Environment (please complete the following information):

  • WordPress Version
  • WooCommerce Version
  • WooCommerce Square Plugin Version
  • Browser [e.g. chrome, safari] and Version
  • Any other plugins installed

Additional details

https://github.com/woocommerce/woocommerce-square-private/pull/986#discussion_r1186885187

@iamdharmesh iamdharmesh added the type: enhancement The issue is a request for an enhancement. label May 22, 2023
@vikrampm1 vikrampm1 added the priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. label May 22, 2023
@jeffpaul
Copy link
Contributor

Leaving a comment here that if we get into bumping the Square SDK that we might want to check and see if this feature was brought out of Beta in that new version such that taking action on this issue might be feasible.

@diegocurbelo diegocurbelo transferred this issue from another repository Jan 8, 2024
@iamdharmesh
Copy link
Member Author

Update:

With Square API release 2023-09-25, the sold_out field is out of BETA and updated to GA.

@lynnjat7
Copy link

Just pinging here as we have an open ticket with a customer waiting for a fix on this (9254090-zen).

I note in this report here:
#262
that it's mentioned (if I'm understanding correctly) that the issue on this report can now be fixed as the Square API sold_out field is now out of beta. But I see that that note was added here back in April 2024.

Is progress on this issue actually being made? We don't want to keep the ticket open indefinitely if this issue is not actively in progress.

@iamdharmesh any thoughts?

@iamdharmesh iamdharmesh self-assigned this Jan 23, 2025
@iamdharmesh
Copy link
Member Author

Hi @lynnjat7, thank you for your comment. As of now, we haven't worked on this yet. However, I am planning to start working on this next week and will update you here once we have a PR ready. Thank you!

@lynnjat7
Copy link

Great, thanks for the update! I'll keep tracking via the ticket.

@kaushikasomaiya
Copy link

Hi @iamdharmesh Thank you for working on it, can you also clarify if fixing this will work both ways:

  • Product or variation marked out of stock on Woo will be marked Sold Out on Square
  • Product marked Sold out on Square will be synced and marked out of stock on Woo as well.

(with Woo SOR and inventory sync enabled)

@iamdharmesh
Copy link
Member Author

Hi @kaushikasomaiya, Thank you for the question.

Product or variation marked out of stock on Woo will be marked Sold Out on Square

This should happen only during the initial push (when creating a product in Square). Since inventory is always pulled from Square to account for inventory updates on the Square side, subsequent syncs will update from Square to Woo.

However, based on my initial review of the Square API documentation regarding the sold_out field, I found that the sold_out field is read-only and cannot be updated via the API. I will investigate further to determine the best approach for handling this.

Image

Product marked Sold out on Square will be synced and marked out of stock on Woo as well.

Correct.

Please let me know if you need any additional information or have any other questions.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
5 participants