Title: Sync causing Zero Stock
Last modified: May 15, 2025

---

# Sync causing Zero Stock

 *  Resolved [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/)
 * When square sends zero stock, plug in changes backorders allowed to zero stock
   and customers can not purchase.
   How to fix this? It was working last week now
   it is not and losing sales

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Support [shahzeen(woo-hc)](https://wordpress.org/support/users/shahzeenfarooq/)
 * (@shahzeenfarooq)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18467340)
 * Hi there!
   Thanks for reaching out!
 * I understand how important this is, especially when it impacts your sales.
 * To help us investigate further, could you please confirm if **any changes were
   made on your site** around the time this issue started — such as plugin updates,
   changes to product settings, or adjustments to your Square account?
 * Also, are you using the **WooCommerce Pre-Orders plugin** ([https://woocommerce.com/products/woocommerce-pre-orders/](https://woocommerce.com/products/woocommerce-pre-orders/))
 * Lastly, please share a **screenshot of your Inventory Sync settings** under **
   WooCommerce → Settings → Square**. This will help us better understand how your
   inventory is syncing between Square and WooCommerce
   In the meantime, I’d like
   to understand your site properly. Could you please share the **System Status 
   Report** which you can find via WooCommerce > StatusPlease use [https://pastebin.com/](https://pastebin.com/)
   or [https://gist.github.com/](https://gist.github.com/) and share a link to that
   paste in reply here. Once we have more information, we’ll be able to assist you
   further.
 *  Thread Starter [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18468570)
 * Hi.
   Not sure about any changes, a third party handles that.I don’t believe I’m
   using pre-orders pluginThey found a line in the plugin:update_post_meta( $variation_id,‘
   _backorders’, ‘no’ );They have changed it to:update_post_meta( $variation_id,‘
   _backorders’, ‘notify’ );I was told that editing the plugin file is not recommended
   because once the plugin is updated, it will revert to its default. They asked
   me to reach out here and ask for a code snippet for a proper and permanent fix.
   Does that make sense to you?
 *  [Zee](https://wordpress.org/support/users/doublezed2/)
 * (@doublezed2)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18469273)
 * Hello [smokinjefe](https://wordpress.org/support/users/smokinjefe/),
 * Thank you for your reply.
 * Could you please let me know who advised you to edit the plugin files and modify
   the code?
   It is not recommended to edit plugin files.
 * Also, could you share your site’s [System Status Report](https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/#system-status)?
   You can upload it to [https://pastebin.com](https://pastebin.com) and share the
   link here. This will help me better understand the situation and assist you more
   effectively.
 * Looking forward to your response. 🙂
 *  Thread Starter [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18477702)
 * [https://pastebin.com/peteetai](https://pastebin.com/peteetai) p/w: VeQ4AC9323
 *  [Jonayed (woo-hc)](https://wordpress.org/support/users/jonayedhosen/)
 * (@jonayedhosen)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18477919)
 * Hi [@smokinjefe](https://wordpress.org/support/users/smokinjefe/) ,
 * Thanks so much for getting back to us and for sharing that info.
 * > Not sure about any changes, a third party handles that.
   > I was told that editing
   > the plugin file is not recommended because once the plugin is updated, it will
   > revert to its default. They asked me to reach out here and ask for a code snippet
   > for a proper and permanent fix.
 * That definitely makes sense — editing plugin files directly can cause issues 
   down the road, especially after updates. We’d love to help with a more permanent
   solution.
 * Could you share a bit more about your setup? For example, is your inventory being
   managed through a specific plugin, or possibly by that third party you mentioned?
   Also, do you happen to know who asked you to add the line of code to the plugin
   file? Was it a developer or maybe someone from your hosting or plugin support
   team?
 * Once we have a little more detail, we’ll be in a much better spot to suggest 
   a safe and lasting fix for you.
 * Looking forward to your reply!
 *  Thread Starter [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18478061)
 * Hi guys.
   I enter stock into square, your plugin syncs square and my website.It’s
   been working fine for as long as I can remember until recently. Sales dropped
   off and a couple customers emailed asking when stock would be back in stock so
   they could order.That prompted me to look into it as customers should always 
   be able to buy and I saw that stock was set to zero instead of backorder.I changed
   it to backorder and waited for the sync to happen which saw the backorder changed
   to zero.I contacted Square who said it’s a WordPress issue.I reached out to my
   hosting team who basically did the same thing and didn’t understand why it was
   changing back to zero.I believe one of them had a look at the code and changed
   it. Since the change it has been working, but he said I need a permanent fix.
 *  [Mahfuzur Rahman](https://wordpress.org/support/users/mahfuzurwp/)
 * (@mahfuzurwp)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18478118)
 * Hi [@smokinjefe](https://wordpress.org/support/users/smokinjefe/),
 * Thanks for the detailed explanation, I can see how frustrating this must have
   been!
 * Since you mentioned that your hosting team made a code change that resolved the
   issue temporarily, could you share the exact details of what was changed? That
   might help us better understand what’s causing the sync to override the backorder
   setting and guide you toward a more permanent fix.
 * Looking forward to your reply!
 *  Thread Starter [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18478140)
 * That was explained in the 2nd post.
 *  Thread Starter [smokinjefe](https://wordpress.org/support/users/smokinjefe/)
 * (@smokinjefe)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18478143)
 * update_post_meta( $variation_id, ‘_backorders’, ‘no’ );
 * Changed to below
 * update_post_meta( $variation_id, ‘_backorders’, ‘notify’ );
 *  [Moses M. (woo-hc)](https://wordpress.org/support/users/mosesmedh/)
 * (@mosesmedh)
 * [1 year ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18478206)
 * Hi [@smokinjefe](https://wordpress.org/support/users/smokinjefe/),
 * Thank you for taking the time to explain things in detail — that really helps
   us better understand the situation.
 * Based on what you’ve shared, it looks like the main issue is that when products
   sync from Square to WooCommerce, any product with a stock quantity of 0 is automatically
   set to not allow backorders. This would explain the drop in sales and why customers
   are reaching out about out-of-stock items.
 * Just to clarify, Square doesn’t manage the backorder setting — it only handles
   stock levels. The backorder status (_backorders) is something WooCommerce controls.
   So what’s likely happening is:
    - Your product stock in Square is set to 0.
    - When the sync occurs, WooCommerce updates the product stock accordingly.
    - WooCommerce then disables backorders (sets it to ‘no’), which is the default
      unless overridden.
 * You’re absolutely right that directly editing the plugin isn’t advisable, as 
   any updates will overwrite your changes.
 * Since you mentioned it used to work fine before — _“It’s been working fine for
   as long as I can remember until recently”_ — let’s try rolling back the plugin
   to a previous versions.
 * I recommend installing the [WP Rollback](https://wordpress.org/plugins/wp-rollback/)
   plugin and using it to revert WooCommerce Square to a version or two earlier.
   This can help us confirm whether a recent update might be the cause.
 * Let me know how it goes after testing with an earlier version!
 *  Plugin Support [Feten L. a11n](https://wordpress.org/support/users/fetenlakhal/)
 * (@fetenlakhal)
 * [12 months ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18509056)
 * Hi there,
 * As there’s been no follow-up, I’ll consider this resolved for the time being.
   We’re happy to jump back in if anything comes up!
 * Apart from this, if you’re happy with our plugin and the support you’ve received,
   we’d really appreciate a review: [https://wordpress.org/support/plugin/woocommerce-square/reviews/#new-post](https://wordpress.org/support/plugin/woocommerce-square/reviews/#new-post)

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Sync causing Zero Stock’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-square/assets/icon-256x256.png?rev=3234354)
 * [WooCommerce Square](https://wordpress.org/plugins/woocommerce-square/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-square/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-square/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-square/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-square/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-square/reviews/)

 * 11 replies
 * 7 participants
 * Last reply from: [Feten L. a11n](https://wordpress.org/support/users/fetenlakhal/)
 * Last activity: [12 months ago](https://wordpress.org/support/topic/sync-causing-zero-stock/#post-18509056)
 * Status: resolved