Woo suddenly dropped half the products stock to 0
-
Hello!
Everything was working fine for a couple of weeks since I set up Square and Woo, however I just noticed that Woo dropped a lot of products stock down to 0 while they are available in Square. I don’t know if this happened over a few days or just instantly for all affected products, a customer sent me a message asking when the product would be back in stock and I was surprised because I knew we had it, so I went to check and found a lot of them mis-synced. I’ll keep an eye if any more products drop over the next few days.
My sync setting is Woo -> Square. Products SKUs match, “Synced with Square” is checked, but the quantity is set to 0 and I have to go over every products and click “Fetch stock from Square” https://imgur.com/a/rwLdkhh
- How do I avoid this in the future?
- What may have caused it?
- And if it happens again, how do I fix it in one click vs opening every product?
Let me know if you need any additional info on this.
Thank you!
- This topic was modified 2 months, 1 week ago by naarian.
-
Hello naarian,
Thank you for contacting Woo support.
It seems like the stock quantities between WooCommerce and Square have become misaligned.
Please share a screenshot of your WooCommerce > Settings > Square page to troubleshoot.
This will help reivew your sync settings.
Here is an example:Additionally, could you enable logging?
It is the last option on the settings page.
Then go to WooCommerce > System Status > Logs and check for error logs related to Square.Looking forward to your response. ??
Best regards.
It just happened again, but I think I found the reason behind it. Seems that every time I create a Purchase Order on Square such as this https://imgur.com/a/Wl088R3, for the items I select it clears the stock on website (Woo) down to 0 even thought it correctly reflects the stock on Square. Other items’ stock is fine. My Woo Settings are correct and I haven’t touched them https://imgur.com/a/WyLfp5c. I have “Enable Logging” on but “Debug Mode” off. I can’t tell if there are any errors in the logs, I believe you can access my logs internally since I am logged in on WordPress website and have my website attached here (log stored at URL/public_html/ca/wp-content/uploads/wc-logs/). Look at the logs dated 09/15 (before I created the last Purchase order that I believe have caused stock problem) and then 09/16 (the day I created that order) and then 09/17 (the day I discovered the issue).
Hello naarian,
Thank you for your reply.
I understand creating a Purchase Order in Square is causing WooCommerce to drop the stock of those items to zero, even though Square reflects the correct stock.
Before we dive deeper, can you confirm if this happens every time you create a Purchase Order? Also, was the stock syncing correctly between WooCommerce and Square before this issue?
As a quick test, could you try manually updating inventory in Square and check if WooCommerce syncs the updated stock correctly? This will confirm if there is a broader issue with the sync feature.
Regarding the logs, I don’t have access to them directly.
Please note that it is against the rules to share any kind of login information in this public forum.
So if you want to share any logs, you can copy them and paste them into your reply.Looking forward to your response. ??
Best regads.
Hello!
I just confirmed the bug following these steps:
- Created a Purchase Order for 2 random items on Square. These items are in stock, 17pcs and 9pcs accordingly
- These very items went out of stock on Woo (0pcs Inventory now)
- I updated the stock on Square manually via Inventory Recount (removed 1pcs, so it’s 16pcs and 8pcs accordingly now)
- The stock on Woo for these items synced up and went from 0pcs to 16pcs and 8pcs accordingly
This is definitely a bug that needs to be addressed asap, I can’t let the stock to drop to 0 for items that I wait to replenish via Purchase Orders. Please let me know what part of log file I should upload if it helps, each day the txt files generated are quite large (1-2mb with thousands of lines of text), not sure if they contain any private information. I can provide access to Support team via a secured channel (tickets?) or happy to help with anything else.
Thank you!
Hi @naarian
I appreciate your patience and detailed explanation on this issue.
To help us investigate this further, we would appreciate if you could provide us with the log files. However, please do not share any sensitive information on this public forum. Instead, you can copy the error logs related to Square and paste them into your reply, or share them via Mozilla Community Pastebin and share the link here.
In the meantime, can you please disconnect and reconnect your Square account and see whether it makes any difference or not?
Looking forward to hearing from you!
Please see the logs for Sep 20 (the day when the test event happened) below. Search the events by SKUs: T-NAVA-5 and T-RED-11. The logs will be available for download for the next 7 days.
I will try to reconnect Square, but just so you know everything else works fine, except this single important bug. Having all the information from my end, I hope you’ll be able to fix it regardless.
Hello naarian,
Thank you for contacting Woo support.
I checked the log and I see Quantity as 0 for the T-NAVA-5.
This means the data arriving from Square has 0 in it which is why the stock is updated accordingly.This should not be happening, and I will help you find the cause and fix it.
Did you get a chance to reconnect the Square?
Sometimes, reconnecting resolves issues like this.
Meanwhile, I suggest you also contact Square support and ask them about this entry in the log.Looking forward to your response. ??
Hello,
Reconnecting didn’t help. I just placed another Purchase order and have to manually fix stock on Woo for over 100 items. Not funny.
The strange thing is that the stock on Square itself does not drop to 0, I don’t know why it’s sent as 0 to Woo. Hence I bet when I create another ticket at Square I’ll be ping ponged back at you saying that the stock on their end doesn’t actually drop to 0.
I am getting super frustrated and tired of this to be honest, and I don’t think the customers should carry out the debugging and communications between the two of you (Woo and Square). How about you take it from here, reach out to Square having all the information on hand now and make sure you have it fixed together asap.
Thank you
Hi @naarian
Thanks for sharing further details. It sounds like there’s an issue with the stock synchronization between WooCommerce and Square.
To make sure we are on the same page, are you manually updating product data in Square? Because, when WooCommerce is set as the Sync Setting, it’s crucial to refrain from manually updating product data in Square (only updating the stock count in Square).?
Furthermore, after checking the log you’ve shared, the issue seems to occur during the inventory calculation process in Square, as the
calculated_at
timestamp precedes the API requests. The Purchase Order may be affecting this calculation, but it’s not visible in this log.Can you please try increasing your PHP post max size and time limit to the maximum allowed value? Lastly, clear the WC cache. To do so, head over to WooCommerce → Status → Tools, and do the following:
- WooCommerce transients – Clear
- Expired transients – Clear
- Clear template cache – Clear
- Capabilities – Reset Capabilities
- Clear customer sessions -Clear
- Product lookup tables – Regenerate
- Regenerate the product attributes lookup table – Regenerate
Next, please clear your browser and server cache and then test again.
I hope this helps! Please let us know how it goes or if you need further assistance.
Hello!
I’ve tried everything you listed and did a full reinstall of the plugin on top of that, removed the app from Square and reconnected it after. At first, I got this error on Woo “Heads up! There may be a problem with your connection to Square. In order to continue accepting payments, please disconnect and re-connect your site”, so I had to reconnect it again to clear the error.
But then exactly after I created a new Purchase order, the stock for those items listed in the Purchase order only, went to 0 on Woo, while other items stayed untouched. It is 100% related to that particular event, nothing else triggers that sudden drop to 0. And I don’t make any changes to the products on Square like you suggested.
I honestly don’t know what to do next, I am so tired fixing the stock back every time, I wish there was at least a “Fetch all stock from Square” button on Woo that would run all products at once.
I am happy to provide you with the access to the website and/or Square account. Just get it fixed please!!!
Hi @naarian
I understand how frustrating this must be, especially when it affects a large number of products.
I honestly don’t know what to do next, I am so tired fixing the stock back every time, I wish there was at least a “Fetch all stock from Square” button on Woo that would run all products at once.
The current problem occurs when Square creates a Purchase Order, but WooCommerce is set as the source of data. This might be causing WooCommerce to misinterpret or ignore the inventory updates.
Could you please change your sync settings to Square and see if there’s any notable change? But before you do that, you must create a backup. This is because the data stored in Square might override all the product data.
Let us know how that goes. Looking forward to hearing from you!
I can’t change my sync settings to Square, I’ve had it that way before and it breaks my catalog structure due to Square limitations on category/subcategory system. Here’s my related topic. So I need it fixed with Woo as the sync source please.
Having a “Fetch all stock from Square” button on Woo that would run all products at once would definitely help as a temporary solution.
Did you reach out to Square? They’ve been ping-ponging me for 2 weeks now with 16 emails in chain and 0 result. My only hope is with you.
I even tried to disconnect Square from Woo, make a Purchase order on Square, waited for like half an hour (my sync setting is 15mins), and reconnected Square back and the products in order were set to 0s. There’s no work around for this, I am doomed until you make a fix!
Hello naarian,
Thank you for your reply.
It might help to try unchecking the “Enable to push inventory changes to Square” option and see if that resolves the issue.
Also, it would be useful to hear Square support’s take on why you’re receiving zero values in the feed. This could provide more insight into what’s happening during the sync process.
Looking forward to your response. ??
Best regards.
If I disable Sync inventory, what’s the point of the plugin then? I need the sync to be always running and keeping up to date to account sales both online (my website) and offline (my brick-and-mortar store). And why do you keep proposing some random things instead of actually fixing the bug in the code? This thread has been going for almost a month and we haven’t got any closer to resolving the issue. Square support does the same thing, just keep stalling with useless replies in hope I’d give up.
As I mentioned earlier, I don’t think your customers should carry out the debugging and communications between the two of you (Woo and Square), we’d be playing a broken telephone game here. Again, reach out to Square yourselves, having all the information on hand and make sure you two find a solution asap. So far in our 16 emails chain with their support I haven’t gotten further in solving it than here with you.
- You must be logged in to reply to this topic.