Migrating WP All Import functions to Super Speedy Imports

January 29, 2024

If you’re moving an import from WP All Import (WPAI) to Super Speedy Imports (SSI), most of the work is mechanical: re-map your columns, pick your unique identifier, and recreate any taxonomies. The part that trips people up is custom functions and field references — WPAI and SSI express them differently. This guide shows how to convert them.

If you haven’t set up the import itself yet, start with the Quick Start Guide (or the product-specific Quick Start: Importing Products), then come back here for the function syntax.

The two things you need to convert

  1. Custom PHP functions — copy the bodies out of WPAI’s Function Editor and paste them into SSI’s functions editor (the Functions section of your import). PHP is PHP; the function bodies themselves usually need no changes.
  2. Field references — this is the real difference. WPAI references a CSV column inline as {column_name[1]}. SSI instead maps a field to a small PHP closure that reads the row.

SSI’s function format

In SSI, a mapped function is a callable closure that receives the current row and a header map, and returns the value for that field:

return function($data, $h) {
    return $x;
};
  • $data — the current CSV row.
  • $h — a map of column name → position, so $h['sku'] gives the index of the sku column.
  • $data[$h['column_name']] — therefore reads the value of column_name for the current row.

That $data[$h['...']] idiom is the SSI equivalent of WPAI’s {...[1]}.

Conversion rules

1. A single column reference

WPAI:

{aw_product_id[1]}

SSI:

return function($data, $h) {
    return $data[$h['aw_product_id']];
};

2. Concatenating columns and literal text

WPAI:

{product_name[1]} by {brand_name[1]}

SSI — concatenate with ., and keep literal text as a normal PHP string:

return function($data, $h) {
    return $data[$h['product_name']] . ' by ' . $data[$h['brand_name']];
};

3. A function reference wrapping column values

WPAI function references look like [my_func({a[1]}, {b[1]})]. For example:

[zeroprice({product_price_old[1]}, {search_price[1]})]

SSI — call your function (defined in the Functions editor), passing the column values as arguments:

return function($data, $h) {
    return zero_price($data[$h['product_price_old']], $data[$h['search_price']]);
};

Make sure the function you call (zero_price above) actually exists in your SSI Functions section — copy it across from WPAI first. Names don’t have to match WPAI’s; just keep your call and your definition consistent.

4. A static / fixed value

SSI has no “fixed value” field type — return the literal from a function:

return function($data, $h) {
    return 'external';
};

Let an LLM do the bulk conversion

If you have a lot of references, it’s quickest to have an AI assistant convert them. Paste this instruction into your model of choice, then paste your WPAI references one at a time (or in bulk):

From now on, convert whatever I paste into a callable PHP function with this
exact format:

    return function($data, $h) {
        return $x;
    };

Rules for what goes where $x is:

- A column reference like {aw_product_id[1]}  ->  $data[$h['aw_product_id']]
- Concatenation with literal text, e.g.
      {product_name[1]} by {brand_name[1]}
  ->  return $data[$h['product_name']] . ' by ' . $data[$h['brand_name']];
- A WPAI function reference, e.g.
      [zeroprice({product_price_old[1]}, {search_price[1]})]
  ->  return zero_price($data[$h['product_price_old']], $data[$h['search_price']]);

Always return a single callable PHP function, even if I paste only a number or
plain text, and no matter how large the paste is.

Always eyeball the output: confirm each column name matches a real header in your CSV, and that any function you call is defined in the SSI Functions editor.

After converting

  • Unique identifier — WPAI’s “unique key” becomes SSI’s unique item identifier (typically SKU). Set it so re-imports update instead of duplicate.
  • Custom fields / postmeta — map them the same way you would any column; see Mapping CSV columns to custom postmeta.
  • Categories — SSI auto-creates terms during import. Nested paths use > (with spaces): see Mapping hierarchical and multi-path taxonomies. As of 2.55.9 a product in Men > T-Shirts is assigned to both levels by default (matching WPAI) — the “Assign every category level” option.
  • Need to transform whole rows or hook the pipeline? A function per field is usually enough; for heavier logic see Creating custom templates.

For why you’d switch in the first place, see the SSI vs WP All Import benchmark comparisons.

×
1/1