WP Manifestindependent plugin directory
manifest / ecommerce / wc-variable-product-csv

WC Variable Product CSV Export/Import

This is a woocommerce plugin for exporting and importing variable product data with media and acf

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sangeeta-code/wc-variable-product-csv/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Requires: WordPress 5.8+, WooCommerce 6+ License: GPL-2.0+

Export and import WooCommerce VARIABLE products together with all their variations — attributes, prices, stock, SKUs, dimensions, images — via CSV.

Where to find it

WooCommerce → Variable Product CSV

CSV structure

Each variable product = one "variable" row, immediately followed by one "variation" row per variation. Rows belong together via product_slug.

Columns:

row_type variable | variation product_slug parent product slug (grouping + mapping key) sku product / variation SKU (primary match key on import) name parent only (required when creating a new product) status parent only: publish | draft | private description parent only (HTML allowed) short_description parent only categories parent only, pipe-separated slugs or names: "tea|green-tea" tags parent only, pipe-separated attributes JSON, see below regular_price variation sale_price variation manage_stock yes | no stock_quantity number (setting it turns manage_stock on) stock_status instock | outofstock | onbackorder backorders no | notify | yes weight / length / width / height tax_class blank = standard virtual yes | no downloadable yes | no enabled variation only: yes | no (variation visibility) menu_order number image attachment ID or URL gallery parent only, pipe-separated IDs/URLs variation_description variation only

ACF columns ("New Product Page Field Group", parent rows only — leave blank on variation rows):

acf_info_items textarea acf_additional_info_text text acf_description_teaser_text text acf_teaser_read_more_text text acf_certificate_tab_content wysiwyg (HTML) acf_why_section_content wysiwyg acf_compare_section_content wysiwyg acf_shipping_section_content wysiwyg acf_terms_section_content wysiwyg acf_extra_accordion_title text acf_extra_accordion_content wysiwyg acf_schema_content wysiwyg acf_faq_image image URL or attachment ID acf_product_benefits JSON: [{"icon":"url-or-id","benefit":"..."}] acf_kratom_effects JSON: [{"icon":"url-or-id","title":"...","content":"

html

"}] acf_product_faqs JSON: [{"question":"...","answer":"

html

"}]

ACF image handling: exported as media-library URLs. On import, URLs that already exist in the media library are matched to their attachment ID; external URLs are sideloaded only when the Images option is enabled. Writes use ACF field keys, so they work even before the fields have data.

attributes column

PARENT row — array of attribute definitions:

[ {"name":"pa_size","taxonomy":true,"options":["Small","Large"],"visible":true,"variation":true}, {"name":"Flavour","taxonomy":false,"options":["Mint","Lemon"],"visible":true,"variation":true} ]

  • "pa_" prefix (or "taxonomy": true) = global attribute. Missing global attributes and terms are created automatically on live import.
  • taxonomy:false = custom (product-level) attribute.

VARIATION row — object of selections (names or slugs both accepted):

{"pa_size":"Small","flavour":"Mint"}

An empty string value means "Any …" for that attribute.

Import matching

  1. Parent rows: matched by SKU, then by product_slug. Unmatched rows create a new variable product (if "create missing" is checked).
  2. Variation rows: matched by SKU, then by attribute combination among the parent's existing variations. Unmatched rows create a new variation.
  3. If a variation row has an empty product_slug, it attaches to the parent from the most recent "variable" row above it.

Safety

  • Dry run mode (default) validates every row and reports what WOULD happen without writing anything. Always run it first.
  • "Skip empty cells" (default on): blank cells keep existing values. Uncheck to allow blanks to clear values (e.g. remove a sale price).
  • "Create missing" can be unchecked for a strict update-only import.
  • Image URLs are only sideloaded into the media library if the Images checkbox is enabled; otherwise only numeric attachment IDs are applied.
  • After a live import, parent products are re-synced (price ranges, stock) and their caches flushed automatically.