Assign SKUs to new WooCommerce products

Generate dynamic SKUs fills an empty SKU when a new product or variation is created. It also gives a duplicated product and its duplicated variations new values.

Enable it under Settings → POM Tweaks → E-Commerce → Advanced → Generate dynamic SKUs.

What changes

  • A newly inserted product with no SKU receives a numeric time-based value.
  • A variation with no SKU receives a value before WooCommerce saves it.
  • A duplicated product receives a new SKU instead of copying the source SKU.
  • Duplicated variations receive new SKUs when saved as part of that duplication.
  • An existing non-empty SKU is preserved.

The module has no prefix, suffix, category, product-ID, or formatting controls.

Verify

  1. Create a simple product and leave SKU empty.
  2. Save it and confirm WooCommerce shows a generated value.
  3. Create a variable product with an empty variation SKU.
  4. Save the variation and confirm it receives its own value.
  5. Duplicate a product and compare source and duplicate.
  6. Edit a product with a manual SKU and confirm the value remains unchanged.

Existing simple products with empty SKUs are not backfilled merely by enabling the module.

Chapter contents

  1. Review creation and duplication boundaries.