WooCommerce Square is the integration of choice for WordPress stores that also operate a Square POS — typically retail with in-store and online channels sharing one inventory. The plugin handles payments and (optionally) two-way sync of products, inventory, and customers. The two-way sync is where most of the failure modes live. Square’s data model (items + variations + modifiers) does not map cleanly to WooCommerce (products + variations + variation attributes), and stores accrete drift over months.
What’s happening
The woocommerce-square plugin connects via OAuth to a Square account and synchronizes three categories of data:
- Products and inventory. Bi-directional, configurable in the plugin settings. Source of truth is either Square or WooCommerce — picking one is the most consequential decision.
- Customers. Optional. WooCommerce customers can be pushed to Square’s Customers directory.
- Payments. Card payments via Square’s Web Payments SDK on the checkout. Cash and other tenders are recorded in Square POS but not in WooCommerce.
The five most common tickets:
- Inventory drift. Square POS sells the last unit of a SKU, WooCommerce continues to show it in stock, an online customer orders it, you cannot fulfill. The sync exists but is delayed by Square’s batching.
- OAuth token expired. The plugin connection silently breaks. Sync stops, but no banner appears in the admin until you hit a payment.
- Modifier vs variation mismatch. A Square item with three modifier sets (size, color, finish) does not import as a WooCommerce variable product cleanly. You end up with the modifiers as additional product attributes that customers see but cannot select.
- Tax category mismatch. Square’s tax category does not align with the WooCommerce tax class. The tax shown to the customer at checkout differs from what Square thinks.
- Webhook delivery failures. Square sends
inventory.count.updatedwebhooks; WooCommerce processes them via/?wc-api=square_webhook. A WAF or a CDN can intercept these.
How to verify
# Plugin version and active state
wp plugin get woocommerce-square --field=version
# Sync settings — which side is source of truth?
wp db query "SELECT option_value FROM wp_options WHERE option_name='wc_square_settings'"
# Last successful sync timestamp
wp db query "SELECT option_value FROM wp_options WHERE option_name LIKE 'wc_square_%sync%'"
# Square OAuth token state
wp db query "SELECT option_name, LENGTH(option_value) FROM wp_options WHERE option_name LIKE 'wc_square_access_token%'"
# An empty / missing token means the connection is broken.
# Square sync log
tail -f wp-content/uploads/wc-logs/wc_square-*.log
tail -f wp-content/uploads/wc-logs/woocommerce-square-*.log
# Pending Square sync actions in Action Scheduler
wp action-scheduler list --status=pending --hook=wc_square_sync_inventory --per_page=20
wp action-scheduler list --status=pending --hook=wc_square_sync_products --per_page=20
# Failed sync actions — the most common ones
wp action-scheduler list --status=failed --hook=wc_square_sync_inventory --per_page=10
# Webhook endpoint reachable?
curl -i 'https://example.com/?wc-api=square_webhook' -X POST -H 'X-Square-Signature: test'
# Inventory drift: items where WooCommerce stock and Square stock disagree
# (requires the plugin's debug tool — Tools → Status → WooCommerce Square)
The most useful signal is the last-sync timestamp combined with the Action Scheduler pending count for wc_square_sync_inventory. If the timestamp is fresh but the pending count is growing, the sync runner is healthy but the queue is faster than the runner. If the timestamp is stale, the sync itself is broken.
The fix
- Pick a source of truth and commit to it. Square or WooCommerce, not both. If the store does in-store sales, Square is usually the right choice (the POS is the most reliable inventory mutation point). If the store is primarily online with occasional in-store, WooCommerce is the right choice. Switching mid-stream creates drift that takes weeks to clean up.
- Re-authenticate when the OAuth token expires. WooCommerce Square stores a refresh token, but refreshes can fail (Square invalidates after policy changes, account password rotation, etc.). The fix is to disconnect and reconnect:
- WooCommerce → Square → Connection → Disconnect
- Reconnect, log into Square, authorize
- The plugin pulls a new token and resumes sync.
- Reconcile inventory drift after the OAuth fix. Trigger a manual sync from the plugin admin (Square → Sync → Sync Now), then verify a few SKUs by hand:
wp wc product get <product_id> --fields=name,stock_quantity # Compare against Square dashboard for the same SKU. - Modifier vs variation mapping. For items with modifier sets in Square, you generally want to manage variations in WooCommerce and disable the Square-to-WooCommerce product import for those items. Set them as “ignored in sync” via the plugin’s per-product settings. Inventory will still sync as long as the SKU matches.
- Tax class alignment. Set Square’s tax to “Pass-through to checkout” and let WooCommerce compute. Or set Square to “Authoritative” and have WooCommerce mirror. Pick one. The mismatch case (both calculating, both displaying) confuses customers and creates accounting reconciliation work.
- Add monitoring on sync health. A check that alerts when the last-sync timestamp is older than 60 minutes catches OAuth expiry and webhook outages within an hour:
wp db query "SELECT TIMESTAMPDIFF(MINUTE, FROM_UNIXTIME(option_value), NOW()) AS minutes_since_sync FROM wp_options WHERE option_name='wc_square_last_inventory_sync'"
For the inventory-sync layer more broadly, the WooCommerce inventory-sync KB article in this set is the companion piece. Pair with enterprise WordPress operations operations for the longer-term sync-health monitoring.
Stack Harbor runs WordPress WooCommerce Square integrations end-to-end through enterprise WordPress operations — the OAuth posture, the inventory-source decision, and the drift reconciliation. If your in-store and online inventory are showing different numbers, we can reconcile and stabilize.