How to Sync WooCommerce Stock Levels from Supplier Feed (Without Re-Importing Everything)

Reading time: 6 minutes
Difficulty: Beginner
Time to implement: 10 minutes

โ€”

The Problem

You run a dropshipping or wholesale store. Your supplier sends you daily stock updates via XML/CSV feed.

Supplier feed (10,000 products):

SKU,Stock,Price
PROD-001,45,29.99
PROD-002,0,15.50
PROD-003,120,89.00
... (9,997 more rows)

What you need:

  • Update stock levels for all 10,000 products
  • Update prices if changed
  • DO NOT touch descriptions, images, categories, attributes
  • Run automatically every night

Wrong approach: Re-import everything

  1. Upload full product feed
  2. Import all fields (name, description, images, categories, etc.)
  3. Time: 2-3 hours
  4. Database stress: High (re-writing 50+ meta fields per product)
  5. Risk: Overwriting custom data (reviews, sales history)
  6. Result: Store slow, database bloated โŒ

Right approach: Selective Stock + Price Update

  1. Import only SKU + Stock + Price
  2. Time: 5-10 minutes
  3. Database stress: Minimal (2-3 fields updated)
  4. Risk: Zero (other fields untouched)
  5. Result: Fast, clean, efficient โœ…

There’s a better way to do this.

โ€”

The Solution: Selective Field Updates

What if you could update only stock and price fieldsโ€”without touching anything else?

With Bootflow Product Importer PRO’s Selective Updates, you can:

โœ… Update ONLY stock levels (leave everything else unchanged)
โœ… Update ONLY prices (skip descriptions, images, etc.)
โœ… Update stock + price together (most common)
โœ… Skip products with unchanged data (10x faster)
โœ… Schedule automatic daily/hourly updates
โœ… Handle 10,000+ products in minutes

Best part: One-click configurationโ€”no custom code, no manual exports.

โ€”

How It Works (3 Simple Steps)

Step 1: Upload Stock Feed

  1. Go to Bootflow Importer โ†’ New Import
  2. Upload supplier CSV/XML or enter Remote URL
  3. Click Next

Bootflow WooCommerce product XML and CSV importer plugin file upload wizard step 1 dashboard screenshot
Screenshot of Bootflow plugin Step 1: Naming your import and uploading the WooCommerce XML or CSV file.

Example CSV (minimal):

SKU,Stock Quantity
PROD-001,45
PROD-002,0
PROD-003,120

Only 2 columns needed!

โ€”

Step 2: Map ONLY Stock Fields

In Field Mapping step:

  1. Map SKU โ†’ SKU (required for matching)
  2. Map Stock Quantity โ†’ Stock Quantity
  3. Leave all other fields empty (don’t map Product Name, Description, etc.)
WooCommerce product XML and CSV importer field mapping step screenshot showcasing loaded file structure and mapping sections.
Step 2: Mapping product feed data fields and configuring import behaviors in this WooCommerce plugin screenshot.

Critical setting:

Enable โœ… “Update Existing Products”

This tells plugin to FIND products by SKU and UPDATE them (not create duplicates).

โ€”

Step 3: Run Import

Click “Start Import”.

What happens:

For each row:

  1. Find product by SKU (e.g., PROD-001)
  2. Update ONLY Stock Quantity = 45
  3. Leave Name, Description, Images, Categories untouched
  4. Move to next row

Result:

  • 10,000 stock levels updated โœ…
  • Time: 5-10 minutes
  • Everything else preserved โœ…

โ€”

Advanced: Stock + Price + Status Updates

Most suppliers send stock AND price in same feed. Update both together:

Supplier CSV:

SKU,Stock,Price,Stock Status
PROD-001,45,29.99,instock
PROD-002,0,15.50,outofstock
PROD-003,120,89.00,instock

Mapping:

  1. SKU โ†’ SKU
  2. Stock โ†’ Stock Quantity
  3. Price โ†’ Regular Price
  4. Stock Status โ†’ Stock Status

Import result:

  • Stock updated โœ…
  • Price updated โœ…
  • Stock status updated โœ…
  • Descriptions/images/categories untouched โœ…

โ€”

Pro Feature: Skip Unchanged Products

Problem:

Out of 10,000 products in feed:

  • 9,500 have same stock as yesterday
  • 500 actually changed

Without optimization:

  • Plugin updates ALL 10,000 products
  • Time: 2-4 hours

With “Skip- Unchanged”:

Enable โœ… “Skip Unchanged Products”

Plugin:

  1. Loads product from database
  2. Compares new stock vs. current stock
  3. If identical โ†’ skip (0.1 second)
  4. If different โ†’ update (2 seconds)

Time: 5-30 minutes (depends on servers, size of import) โœ…

How to enable:

In Import Settings:

  • Check โœ… “Skip products if data unchanged”

โ€”

Real-World Scenario: Dropshipping Store

Setup:

  • 8,000 products
  • Supplier sends stock feed every 6 hours
  • Need automatic updates

Import Configuration (5 minutes):

Step 1: File Source

  • Remote URL
  • Schedule: Every 6 hours

Step 2: Field Mapping

  • SKU โ†’ SKU
  • Stock โ†’ Stock Quantity
  • Price โ†’ Regular Price

Step 3: Import Settings

  • โœ… Update Existing Products
  • โœ… Skip Unchanged Products
  • โœ… Schedule: Every 6 hours (Action Scheduler)

Step 4: Save Template

  • Name: “Supplier Stock Sync”

Done!

From now on:

  • Every 6 hours: Feed auto-downloads
  • Stock + Price update: Automatic
  • Time per update: 2-3 minutes
  • Manual work: ZERO โœ…

โ€”

Advanced: Stock Status Rules

Sometimes supplier feed doesn’t include “Stock Status” field. You can auto-calculate it:

Use PHP formula:

Field: Stock Status
Formula:

php

{stock_quantity} > 0 ? 'instock' : 'outofstock'

Result:

  • If Stock Quantity > 0 โ†’ Status = “In Stock”
  • If Stock Quantity = 0 โ†’ Status = “Out of Stock”

No supplier coding needed.

โ€”

Handling Backorders

Supplier sends:

SKU,Stock,Backorder
PROD-001,0,yes
PROD-002,50,no

Map:

  • Stock โ†’ Stock Quantity
  • Backorder โ†’ Allow Backorders

Values:

  • yes โ†’ Allow backorders
  • no โ†’ Do not allow
  • notify โ†’ Allow, but notify customer

Result:

  • PROD-001: Stock = 0, but customers can still order (backorder)
  • PROD-002: Stock = 50, normal behavior

โ€”

Common Mistakes to Avoid

โŒ Mistake 1: Not Enabling “Update Existing Products”

If disabled:

  • Plugin tries to CREATE new products
  • SKUs already exist โ†’ import fails โŒ

Fix:
Always enable โœ… “Update Existing Products” for stock sync.

โ€”

โŒ Mistake 2: Mapping Too Many Fields

Problem:
You map:

  • SKU
  • Stock
  • Price
  • Product Name โ† unnecessary
  • Description โ† unnecessary
  • Images โ† unnecessary

Result:

  • Plugin updates ALL these fields
  • Overwrites custom descriptions you edited manually โŒ

Fix:
Map ONLY fields you want to update (usually just SKU + Stock + Price).

โ€”

โŒ Mistake 3: Wrong SKU in Feed

Supplier CSV:

SKU,Stock
PROD-001-WRONG,50

Your WooCommerce SKU: PROD-001

Result:

  • Plugin can’t find product (SKU mismatch)
  • Update fails โŒ

Fix:
Use SKU normalization formula:

php

str_replace('-WRONG', '', {sku})

Result: PROD-001 (matches WooCommerce)

โ€”

โŒ Mistake 4: Forgetting to Enable Stock Management

Per product, WooCommerce needs:

“Manage Stock” = Yes

If disabled:

  • Stock Quantity field is ignored
  • Product always shows “In Stock” โŒ

Fix:
Map field Manage Stock โ†’ Value: 1 (true)

โ€”

Technical Details: How Selective Updates Work

For transparency, here’s what happens during stock sync:

1. Load Product by SKU
   SQL: SELECT ID FROM wp_posts WHERE post_type='product' AND sku='PROD-001'
   Found: Product ID 12345

2. Get Current Stock
   Current: Stock = 40

3. Compare New vs. Current
   New: Stock = 45
   Difference: +5 (changed!)

4. Update ONLY Stock
   SQL: UPDATE wp_postmeta SET meta_value='45' WHERE post_id=12345 AND meta_key='_stock'

5. Trigger WooCommerce Stock Hook
   WooCommerce updates stock status automatically
   If stock > 0 โ†’ Status = "instock"
   If stock = 0 โ†’ Status = "outofstock"

6. Clear Cache
   WooCommerce + LiteSpeed/W3TC cache cleared for product page

7. Skip Other Fields
   Name, Description, Images, Categories โ†’ NOT TOUCHED

This happens in ~0.5 seconds per product.

For 10,000 products = ~80 minutes (if all changed)
With “Skip Unchanged” = ~5 minutes (if only 500 changed)

โ€”

Use Cases: Who Benefits from Stock Sync?

Dropshipping Stores

  • Supplier stock changes hourly
  • Must keep WooCommerce in sync
  • Automatic import every hour

Wholesale Distributors

  • 50,000+ SKU catalog
  • Stock feed updates daily
  • Only 2-3% of products change per day
  • “Skip Unchanged” makes it feasible

Multi-Warehouse Stores

  • Combine stock from 3 warehouses
  • Feed 1: Warehouse A stock
  • Feed 2: Warehouse B stock
  • Feed 3: Warehouse C stock
  • Import each, sum stock levels

Marketplace Sellers

  • Sell on WooCommerce + Amazon + eBay
  • Central stock management system sends feed
  • Update all platforms from one source

โ€”

Advanced: Multi-Field Selective Updates

You can be even more selective:

Scenario:
Update stock for ALL products, but prices ONLY for category “Electronics”

Setup:

Import 1: Stock Sync (All Products)

  • Map: SKU โ†’ Stock Quantity
  • Filter: None (all products)
  • Schedule: Every hour

Import 2: Price Sync (Electronics Only)

  • Map: SKU โ†’ Regular Price
  • Filter: Category = “Electronics”
  • Schedule: Daily

Result:

  • Stock updates every hour โœ…
  • Prices update daily, only Electronics โœ…
  • Other categories’ prices unchanged โœ…

โ€”

Next Steps

Want to test stock sync?

Simply head over to the menu and select ‘DEMO importer’ to get started.

No data will be saved and will be permanently deleted

โ€”

FAQ

Q: Can I update ONLY out-of-stock products?
A: Yes! Use Import Filters:
Condition: Stock Quantity = 0
Action: Update only those products

Q: Can I sync stock from multiple suppliers?
A: Yes! Create separate import templates:

  • Supplier A stock sync (runs hourly)
  • Supplier B stock sync (runs daily)
    Each updates different SKUs

Q: What if supplier SKUs don’t match mine?
A: Use SKU mapping table or PHP formula to normalize SKUs before matching.

Q: Can I update stock for variable products?
A: Yes! Each variation has its own SKU. Update variation stock by mapping variation SKU โ†’ Stock Quantity.

Q: Does stock sync trigger “Back in Stock” notifications?
A: Yes, if you use a plugin like “WooCommerce Waitlist”. Stock changes trigger WooCommerce hooks, which those plugins listen to.

Q: Can I schedule stock sync to run at specific times?
A: Yes! Use WP-Cron scheduling:

  • Every 15 minutes
  • Hourly
  • Daily at 3 AM
  • Weekly on Mondays

Q: What happens if import fails mid-way?
A: Plugin uses ActionScheduler background processing. If it fails, it automatically retries. You can resume from where it stopped.

โ€”

Tags: WooCommerce stock sync, automatic inventory update, CSV stock import, selective product update, dropshipping automation

Related Articles:

  • How to Import Variable Products from XML/CSV
  • Auto-Calculate Product Prices with Markup Engine
  • Import 10,000 Products Without PHP Timeout Errors