WP Manifestindependent plugin directory
manifest / ecommerce / korky-migrate-size

Korky — WooCommerce Attribute Migration

This is a one-time WordPress must-have plugin for migrating global WooCommerce product attributes to another global attributes, including variation attributes.

by techgeeksvk · github.com/techgeeksvk/korky-migrate-size

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/techgeeksvk/korky-migrate-size/archive/refs/heads/main.zip

English is the default language. The admin tool also provides a Slovak (SK) language switch.

Purpose

This is a one-time WordPress must-use plugin for migrating one global WooCommerce product attribute to another global attribute, including variation attributes.

Example:

pa_velkost-od-do -> pa_velkost

The tool preserves existing target attribute terms and other product data. It removes the source attribute only after the migration plan and post-migration validation succeed.

Requirements

  • WordPress with WooCommerce active
  • PHP 7.4 or newer
  • The source and target global attribute definitions must already exist in WooCommerce
  • An administrator with the manage_woocommerce capability
  • A current database backup before any live migration

Installation

Place the plugin file in the WordPress MU-plugin directory:

wp-content/mu-plugins/korky-migrate-size.php

MU-plugins are loaded automatically. No activation step is required.

Usage

Open:

Tools -> WooCommerce Attribute Migration

  1. Select the source attribute.
  2. Select the target attribute.
  3. Choose a specific product or all products with the source attribute.
  4. Select DRY RUN first.
  5. Review the final report.
  6. For a live run, confirm the database backup and, for the all-products scope, confirm the bulk operation.

The language selector is available at the top of the form. English is selected by default; Slovak can be selected before starting or continuing a run.

Do not pre-create target terms

The target global attribute definition must exist, but the target terms/values do not need to be copied manually.

For example, for:

pa_velkost-od-do -> pa_velkost

do not manually create all pa_velkost terms such as 56-62, 68-74, or 92-98. The plugin reads the source terms, reuses a matching target term when it already exists, and creates missing target terms automatically from the source attribute. It then assigns the resulting target terms to the product and its variations.

The plugin currently validates that the global target attribute definition itself exists before starting; it creates and imports the target terms, not the global attribute definition.

Batch processing

The all-products scope is processed in batches of 10 products. The next batch is submitted automatically through a normal admin POST request, so the operator does not need to click through every batch.

  • No AJAX, REST endpoint, cron task, or WP-CLI command is used.
  • The public storefront is not involved in the process.
  • The report is displayed after the final batch instead of after every batch.
  • A short-lived WordPress transient stores progress and report chunks so one request does not keep the full catalog in memory.
  • The transient lifetime is two hours and completed temporary state is removed.
  • The technical transient state is not a product, term, or variation migration write. DRY RUN does not save product attributes, variation attributes, or taxonomy relationships.

If the browser is closed, the batch can be resumed while its temporary state is still available. If the state expires, start a new DRY RUN.

Safety behavior

The tool stops on:

  • missing or invalid global attributes and taxonomies;
  • custom product attributes used where taxonomy attributes are required;
  • unmappable source terms or variation values;
  • conflicting variation-level target values;
  • loss of other product attributes;
  • missing target terms or failed taxonomy relationships;
  • changes to SKU, prices, stock quantity, stock management, image, or variation post status;
  • failed saves, reloads, lookup refreshes, or post-migration validation.

WooCommerce or an inventory integration may recalculate stock_status while a variation is saved. Such a change is recorded as a warning and does not stop the attribute migration. The plugin does not force the old stock status back, because that could overwrite a legitimate inventory update.

If a real error occurs after a live save, inspect the affected product before starting another live run. Run a new DRY RUN first; do not blindly repeat a live migration.

Files

  • korky-migrate-size.php — the MU-plugin
  • readme.md — this documentation

Verification

The plugin can be syntax-checked without loading WordPress or touching the database:

php -l wp-content/mu-plugins/korky-migrate-size.php

License

This plugin is released under the MIT License. It may be used, copied, modified, and redistributed, including commercially, provided that the copyright and permission notice are retained.

It is provided free of charge and without warranty. The operator is responsible for backups, testing, and checking the result of any live migration.

MIT License

Copyright (c) 2026 Korky

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.