Skip to content

Conversation

@m-muhsin
Copy link
Collaborator

@m-muhsin m-muhsin commented Dec 13, 2025

image

All Submissions:

  • Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Will this change require new documentation or changes to existing documentation?

Changes proposed in this Pull Request:

Adds the above notice.

Closes https://linear.app/a8c/issue/SQUARE-204/bulk-stock-changes-in-wc-dont-sync-to-square.

Steps to test the changes in this Pull Request:

  1. Set up Square with WooCommerce as the System of Record (SoR)
  2. Ensure "Sync inventory" is enabled in WooCommerce > Settings > Square
  3. Create or select 2+ products that are synced with Square and have stock management enabled (e.g., Product A with qty 10, Product B with qty 11)
  4. In Products list, select the products and click "Edit" under Bulk actions
  5. In the bulk edit panel, notice the above screenshot.

Changelog entry

Add - Show a notice for Square SOR and inventory sync in bulk edit screen.

Copy link
Collaborator

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @m-muhsin.

While doing quick check, I noticed that if we update stock of product with manage stock disabled using bulk edit, it become out of stock after some time.

This is due to how Inventory Sync work (Docs). Inventory is always pulled from Square to account for stock updates on the Square side (e.g., POS transactions), even when WooCommerce is set as SOR. For Woo SOR, Inventory only syncs from Woo to Square during the initial sync or when stock quantity is updated on the product edit page by clicking "Fetch stock from Square."

Currently, we don't have real time updates for the stock updates at Square side. So, we are sync it every 15 mins. But there is always chance that stock on WooCommerce is not up to date. So, we suggests merchant to update stock from the product edit page by clicking "Fetch stock from Square." or directly update on Square itself (Regardless of SOR).

For adding support for the stock changes using the Bulk edit we need to keep these things in mind and need to update implementation accordingly. Happy to discuss this over call if needed. Thank you.

@m-muhsin
Copy link
Collaborator Author

Hi @iamdharmesh,

While doing quick check, I noticed that if we update stock of product with manage stock disabled using bulk edit, it become out of stock after some time.

I could replicate the issue you mentioned.

This is due to how Inventory Sync work (Docs). Inventory is always pulled from Square to account for stock updates on the Square side (e.g., POS transactions), even when WooCommerce is set as SOR. For Woo SOR, Inventory only syncs from Woo to Square during the initial sync or when stock quantity is updated on the product edit page by clicking "Fetch stock from Square."

Currently, we don't have real time updates for the stock updates at Square side. So, we are sync it every 15 mins. But there is always chance that stock on WooCommerce is not up to date. So, we suggests merchant to update stock from the product edit page by clicking "Fetch stock from Square." or directly update on Square itself (Regardless of SOR).

For adding support for the stock changes using the Bulk edit we need to keep these things in mind and need to update implementation accordingly. Happy to discuss this over call if needed. Thank you.

Agree on the above.

Also, there seems to be an issue here.

Please refer to this video:

Screen.Recording.2025-12-17.at.7.32.21.PM.mov

Individual stock updating is not being allowed. However, bulk updating of stock seems to work fine.

Perhaps we need to think about a different strategy here?

@iamdharmesh
Copy link
Collaborator

Hi @m-muhsin,

Individual stock updating is not being allowed. However, bulk updating of stock seems to work fine.

Yes, bulk stock updates work with this PR in some cases, but as I mentioned earlier, it still has issues. We need to keep Square as the source of truth for inventory updates regardless of the SOR until real-time stock updates from Square -> WooCommerce are implemented via webhooks.

For now, I think the best next step would be to add a note near the stock field in bulk edit to inform users that inventory updates will not work for Square sync-enabled products, as the values are ultimately overwritten with data from Square. For reference, we already show a similar notice on the product import screen, and we could follow a similar approach here.

image

@dkotter @faisal-alvi tagging you here to check what do you think on this or if we have any better way to solve this. Thank you.

@m-muhsin
Copy link
Collaborator Author

Thanks, @iamdharmesh. I will wait on the response from Darin / Faisal and take any next steps on this one.

@dkotter
Copy link
Collaborator

dkotter commented Dec 18, 2025

For now, I think the best next step would be to add a note near the stock field in bulk edit to inform users that inventory updates will not work for Square sync-enabled products, as the values are ultimately overwritten with data from Square. For reference, we already show a similar notice on the product import screen, and we could follow a similar approach here

Yeah, I think this is fine for now, noting it doesn't actually fix anything but at least it makes it more clear for the merchant

Implement a MutationObserver to display a warning message in the bulk edit form when Square SOR and inventory sync are enabled. The notice informs users that inventory updates will not apply to Square-synced products and will be overwritten during the next sync.
@m-muhsin m-muhsin changed the title Fix bulk stock changes not syncing to Square when WooCommerce is the SoR Add notice for Square SOR and inventory sync in bulk edit screen Dec 20, 2025
@m-muhsin
Copy link
Collaborator Author

I have now updated the PR with the notice as shown in the screenshot on the PR description. Thanks, @iamdharmesh @dkotter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants