← All resources

WooCommerce / Toolkit

WooCommerce CSV Preflight

Check a product import CSV offline for duplicate SKUs and missing or ambiguous variation parents.

Catch SKU and variation mistakes before import

Use this offline check on a product CSV before a catalog migration or bulk update. It flags repeated nonempty SKUs and variation rows that point to a blank, duplicate, self-referencing or non-variable parent. It also flags parent references it cannot verify from the file.

Run the check

  1. Install Python 3, extract the ZIP, and open a terminal in the extracted folder. No packages are required.
  2. Run python3 check.py example.csv. The sample reports parent_not_in_file at line 4: MUGG is not the parent SKU MUG.
  3. Run python3 check.py "/path/to/products.csv" with a comma-delimited UTF-8 CSV containing SKU, Type and Parent headers.
  4. Review the reported line numbers and fix the source spreadsheet, then export and rerun. Exit codes: 0 means no findings, 1 means review findings, and 2 means input error. For multiline CSV records, the line number is where the record ends.
  5. Back up your catalog and test a small batch on staging with the importer you plan to use. Inspect the import report before going live.

What the report can verify

SKU matching is case-sensitive after trimming surrounding whitespace; leading zeros are preserved. A parent absent from the file may already exist in the store. Check id: references and off-file parents manually. The tool does not verify store records, IDs, attributes, import order, column mapping or third-party schemas. A clean report does not guarantee a successful import. No WordPress or WooCommerce runtime, HPOS, Blocks or Windows compatibility was tested.

If the header check fails, export as comma-delimited UTF-8 and check the exact header names. The checker reads one local file and prints JSON without uploading or modifying it. Delete the extracted folder to remove the tool; no store rollback is needed.

Sources and alternatives

Reviewed 4 November 2026: the built-in importer maps and imports products; the Product CSV Import Suite has its own variation workflow. This toolkit checks the CSV before using an importer.

Version 1.0.0: initial release. MIT license. Tested with CPython 3.12.14 on Linux.

Need it tailored to your website?

I can help with installation, custom features, WooCommerce workflows, and integrations that fit your business.

Let’s talk ↗