WP Manifestindependent plugin directory
manifest / ecommerce / product-sheet-importer-for-woocommerce

Product Sheet Importer for WooCommerce

Paste a product sheet into one box on the WooCommerce product screen and fill 13 fields, including global attribute terms.

★ 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/asymetria/product-sheet-importer-for-woocommerce/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.

Paste a complete, pre-formatted product sheet into one box on the product edit screen, click Import Product Sheet, and every section is copied into the correct WooCommerce / SEO / featured-image field. HTML is preserved verbatim; empty or missing sections are skipped so existing content is never deleted.

Requirements

WordPress 5.8+, PHP 7.4+, WooCommerce 6.0+. WooCommerce has to be active: the plugin checks for it on plugins_loaded and, if it is missing, does nothing and says so in an admin notice rather than failing on the next product save.

What it fills

Sheet section Target field
Product Title Product title (post_title)
Slug Permalink (post_name)
Short Description HTML Short description (post_excerpt) — HTML kept
Long Description HTML Description (post_content) — HTML kept
Attributes Global attribute terms when one matches, otherwise a local attribute
Tags Product tags - existing ones reused, missing ones created
SEO Title / Main Keyword / Meta Description Active SEO plugin's fields
Image ALT / Title / Caption / Description Featured image (attachment) meta

SEO plugin compatibility

Auto-detects and writes to whichever is active:

  • Yoast SEO — _yoast_wpseo_title, _yoast_wpseo_focuskw, _yoast_wpseo_metadesc
  • Rank Math — rank_math_title, rank_math_focus_keyword, rank_math_description
  • SEOPress — _seopress_titles_title, _seopress_analysis_target_kw, _seopress_titles_desc
  • All in One SEO — via its model API

The detected plugin is shown at the top of the meta box.

Sheet format

Each section header sits on its own line (a trailing colon is optional and case is ignored). Everything until the next recognised header is that section's value:

Product Title
Ethiopia Yirgacheffe Single-Origin Coffee — Whole Bean 340g

Attributes
Roast Level: Light-Medium
Tasting Notes: Jasmine | Citrus | Black Tea

Tags
single-origin, ethiopia, whole bean

Attribute values accept | or , separators; tags accept commas or new lines.

Attributes: global or local

Attributes are the one place where a product sheet can quietly do the wrong thing, so the importer resolves them in two steps.

  1. A matching global attribute wins. The label from the sheet is compared against every registered attribute taxonomy - by label (Kolor), by slug (kolor) and by taxonomy name (pa_kolor), ignoring case. On a match the plugin resolves each value to a term, creating the ones that do not exist yet, assigns the product to those terms with wp_set_object_terms() and stores the attribute with the real attribute ID. That is what makes layered nav, attribute filters and attribute archives see the product.
  2. No match creates the global attribute - but only when Create global attributes the shop does not have yet is ticked on the product screen, because a typo in a sheet would otherwise become a permanent attribute. Off by default; the choice is remembered per user. The new taxonomy is registered immediately, because WooCommerce only registers attribute taxonomies on init and that has long since fired by the time a product is saved. The admin notice lists whatever was created.
  3. A local attribute the product already has is filled in place. No global twin is created next to it - the sheet fills values, it does not restructure a product somebody set up by hand.

Creating attributes is a shop-wide change, so it needs the manage_woocommerce capability. To switch it off completely and keep the old local-attribute fallback:

add_filter( 'psifw_create_missing_attribute', '__return_false' );

Two more rules follow the same "never destroy what you were not asked to change" idea as the rest of the plugin:

  • An Attributes section replaces only the attributes it names. Anything else already on the product stays.
  • An attribute that already exists keeps its position, its visibility and its used for variations flag, so re-importing a sheet does not unhook a variable product's variations.

Tags

The Tags section is the product's tag list, so it replaces the tags that were there - unlike attributes, where only the attributes the sheet names are touched. Tags are passed to WordPress by name, so a tag that already exists is reused and one that does not is created.

What the notice tells you

After an import the admin notice lists the fields that were filled, any global attributes that were created, and a line-by-line account of the Attributes block - including the reason a line was skipped and the exact WordPress error when a term or an attribute could not be created. The meta box header shows the plugin version, so there is never any doubt about which build is running.

If nothing is recognised

The import is skipped, an admin notice explains it, and the pasted text is put back into the box - a long paste is never lost to a failed import.

Tests

php tests/run.php

61 tests covering the sheet parser, attribute resolution and creation, tags, SEO plugin handling, loading, the meta box, paste recovery and what the notice reports.

No PHPUnit and no WordPress install needed - tests/bootstrap.php provides the handful of WP and WooCommerce functions the plugin calls, so the attribute and parsing logic can be exercised anywhere PHP 7.4+ runs.

Files

product-sheet-importer-for-woocommerce.php                    plugin header + bootstrap
includes/class-product-sheet-importer-for-woocommerce.php     the importer
assets/admin.css, assets/admin.js                             meta box, enqueued on the product editor
readme.txt                                                    the WordPress.org readme
tests/                                                        the test suite

The class sits in its own file and is loaded behind a class_exists() check, so a second copy of the plugin - a stray folder, a file dropped in by hand - cannot redeclare it and bring the site down on activation.

Install

  1. Copy the woo-product-sheet-importer folder into wp-content/plugins/.
  2. Activate Product Sheet Importer for WooCommerce in Plugins.
  3. Open any product → find the Import Product Sheet box → paste the sheet → click Import Product Sheet. The button saves the product and fills the fields in one step.

Safety

  • Runs only for users with the edit_product capability, behind a nonce.
  • Only fires when the import button was used, so normal edits are untouched.
  • Creating global attributes additionally requires manage_woocommerce.
  • Missing sections are never written, so partial sheets can't blank a field.

Notes

  • The header labels and the value separator are configurable: the parser is driven by one $sections map and one delimiter, so it adapts to the sheet you actually use.
  • The featured image must already be set on the product - the plugin annotates it, it does not upload images.
  • Prices, stock and SKU are deliberately out of scope.

Live demo

An interactive, no-install demo of the same parser + UI: Open demo.html in any browser, or try the hosted version: https://asymetria.com.pl/demo.html

The "Test: remove a section" button in the demo shows the core rule in action: a missing section never overwrites what is already in the field.