Bestseller High rating Documented

SKU Generator for WooCommerce

(1 customer review)

From: $29.99 / year

Add full Stock Keeping Unit (SKU) support to WooCommerce.

$29.99 Single site1 year of updates and support30-day money-back guaranteeBuy
$79.99 Unlimited sites1 year of updates and support30-day money-back guaranteeBuy
Clear

SKU Generator for WooCommerce plugin adds full SKU support to WooCommerce:

  • Set SKU by custom format (prefix, suffix, number length, category, tag) automatically for new products.
  • Regenerate SKUs for all existing products – tested in WooCommerce shop with large number of products.
  • Optionally regenerate only for products with no SKU.
  • Add product searching by SKU on frontend.
  • Add SKU to customer emails.
  • Allow duplicate SKUs.

SKU Format Options

This section lets you set format for SKUs.

SKU Generator for WooCommerce - SKU Format Options

Number generation
Possible values: from product ID, sequential or pseudorandom.
Default: From product ID
Sequential number generation counter
Ignored if “Number Generation” is not “Sequential”.
Default: 1
Prefix
Default: None
Minimum number length
Default: 0
Suffix
Default: None
Variable products variations
Possible values: SKU same as parent’s product, generate different SKU for each variation or SKU same as parent’s product + variation letter suffix.
Default: SKU same as parent's product
Template
Replaced values: {category_prefix}, {category_suffix}, {category_slug}, {category_name}, {tag_prefix}, {tag_suffix}, {tag_slug}, {tag_name}, {prefix}, {suffix}, {variation_suffix}, {sku_number}. Please note that in order to use any of {category_...} or {tag_...} replaced values, corresponding section must be enabled.
Default:
{category_prefix}{tag_prefix}{prefix}{sku_number}{suffix}{tag_suffix}{category_suffix}{variation_suffix}
Variable Products Variations field has three options:

  1. SKU exactly the same as parent product’s.
  2. SKU is different for each variation: for example, parent SKU – 0001, variations – 0002, 0003, 0004 etc.
  3. SKU same as parent product’s + variation letter suffix: for example parent SKU – 0001, variations – 0001a, 0001b, 0001c etc.

More Options

SKU Generator for WooCommerce - More Options

Automatically generate SKU for new products
If enabled – all new products will automatically get SKU according to set format values. To change SKUs of existing products, use Regenerator tool.
Default: yes
Delay SKU generation till product is published
Check this if you are using category/tag prefix/suffix for products SKU or individual SKUs for variations.
Default: yes
Generate SKUs only for products with empty SKU
Default: no
Allow duplicate SKUs
Default: no
Search by SKU
Add product searching by SKU on frontend.
Default: no
Search by SKU: Algorithm
Change this if you are experiencing issues with search by SKU on frontend. Possible values: posts_search; pre_get_posts.
Default: posts_search
Add SKU to customer emails
Default: no

Categories Options

SKU Generator for WooCommerce - Categories Options

Enable/Disable
Default: no
Sequential numbering on per category basis
Default: no
Category X Prefix
Default: None
Category X Suffix
Default: None
Category X Counter
Default: 1

Tags Options

SKU Generator for WooCommerce - Tags Options

Enable/Disable
Default: no
Tag X Prefix
Default: None
Tag X Suffix
Default: None

SKU Regenerator Tool

SKU Generator for WooCommerce - SKU Regenerator Tool

Tips & Tricks


To style SKU on frontend, try adding some custom CSS (e.g. to “Appearance > Customize > Additional CSS”):

div.product_meta span { display: block !important; }
div.product_meta span.sku_wrapper { color: green !important; }
div.product_meta span.sku { color: red !important; }


For developers – to get SKU by product ID in PHP:

if ( ! function_exists( 'get_product_sku_by_id' ) ) {
    /**
     * Gets product SKU by product ID in WooCommerce.
     */
    function get_product_sku_by_id( $product_id ) {
        $product = wc_get_product( $product_id );
        return $product->get_sku();
    }
}

Free vs Pro

Free Version Pro Version
Number generation: From product ID
Number generation: Sequential
Number generation: Pseudorandom
SKU prefix
Minimum number length
SKU suffix
Variable products variations: SKU same as parent’s product
Variable products variations: Generate different SKU for each variation
Variable products variations: SKU same as parent’s product + variation letter suffix
SKU template
Automatically generate SKU for new products
Delay SKU generation till product is published
Generate SKUs only for products with empty SKU
Allow duplicate SKUs
Search by SKU on frontend
Add SKU to customer emails
Categories: Sequential numbering on per category basis
Categories: SKU prefix per category
Categories: SKU suffix per category
Tags: SKU prefix per tag
Tags: SKU suffix per tag
“SKU Regenerator” tool

1 review for SKU Generator for WooCommerce

  1. Bennett

    Great plugin! Best of all SKU plugins I have tried and support is very responsive.

Add a review

Your email address will not be published. Required fields are marked *

Free version

This plugin is a premium version of free "SKU Generator for WooCommerce" plugin.

Changelog

1.6.0 - 2022-03-07

  • NEW: add filter 'wpwham_sku_sku_template_variables'. This filter will be useful for creating your own SKU template variables using custom code.
  • UPDATE: for variation suffixes based on product attributes, the names of those attributes will now be filtered to prevent non-standard characters going into the SKU. For example, spaces will be replaced with hyphens; accented letters will be replaced with non-accented ones, etc.
  • UPDATE: PHP 8 now officially supported.
  • UPDATE: updated .pot file for translations.

1.5.1 - 2021-04-12

  • UPDATE: bump tested versions

1.5.0 - 2021-01-20

  • NEW: add support for Yoast primary categories.
  • NEW: add product attributes as option for variation suffix (thanks to Joseph VanTine).
  • FIX: issues when using Search by SKU "pre_get_posts" algorithm.
  • FIX: minor display bug on settings page, also clarify settings page wording a little.
  • UPDATE: updated .pot file for translations.

1.4.3 - 2020-09-17

  • UPDATE: bump tested versions

1.4.2 - 2020-08-25

  • UPDATE: updated .pot file for translations.
  • UPDATE: updated updater.

1.4.1 - 2020-07-24

  • FIX: issue with variations always being assigned same SKU as parent product, when inserting new product.
  • UPDATE: display our settings in WC status report.

1.4.0.1 - 2020-06-16

  • FIX: Possible plugin conflict.

1.4.0 - 2020-06-08

  • NEW: add "Generate SKUs for Variations" option to variations bulk action dropdown.
  • NEW: add new settings to customize variation suffix -- now has option to be "letters" OR "numbers". (Previously it was always "letters".)
  • NEW: allow forcing uppercase letters in SKU templates.
  • FIX: proper handling of variation suffix when set to "letters" and product has more than 26 variations.
  • FIX: show correct "old SKU" for variations in bulk regenerator tool preview.
  • UPDATE: reorder columns in previews (show Old SKU on the left, New SKU on the right).
  • UPDATE: updated .pot file for translations.

1.3.3 - 2019-12-17

  • UPDATE: bump tested versions

1.3.2 - 2019-11-15

  • UPDATE: bump tested versions

1.3.1 - 2019-09-14

  • UPDATE: bump tested upto versions

1.3.0 - 2018-10-21

  • NEW: implement software licensing system; allows for one-click updates of the Premium version
  • UPDATE: updated .pot file for translations

1.2.5 - 2018-09-20

  • Dev - General - {category_slug}, {category_name}, {tag_slug} and {tag_name} replaced values added.
  • Dev - General - Template - Admin settings field now accepts "raw" input.
  • Dev - Tool - Minor restyling.

1.2.4 - 2018-09-10

  • Dev - "Contributors" and "Author URI" updated.

1.2.3 - 2018-08-25

  • Fix - version_updated() function fixed.

1.2.2 - 2018-08-23

  • Fix - "Search by SKU" option fixed (and "Search by SKU: Algorithm" option added to "General > More Options > Search by SKU").
  • Dev - "Sequential numbering on per category basis" option added.
  • Dev - "WC tested up to" added to plugin header.
  • Dev - General - More Options - Automatically generate SKU for new products - "Delay SKU generation till product is published" option default set to "yes".
  • Dev - Code refactoring.
  • Dev - Admin settings restyled.
  • Dev - Plugin URI updated.

1.2.1 - 2017-12-06

  • Dev - General - WooCommerce v3.2.0 compatibility - select type in admin settings fixed.
  • Dev - General - "Delay SKU generation till product is published" option added.
  • Dev - General - Admin settings minor restyling.
  • Dev - Saving settings array as main class property.

1.2.0 - 2017-04-18

  • Dev - WooCommerce v3.0.0 compatibility - get_child() replaced with wc_get_product().
  • Dev - "Template" option added.
  • Dev - "Pseudorandom - Hash (max 10 digits)" option added to "Number Generation".
  • Dev - "Generate SKUs Only for Products with Empty SKU" option added.
  • Dev - "Categories Options" section added.
  • Dev - "Tags Options" section added.
  • Dev - "Search by SKU" option added.
  • Dev - "Add SKU to Customer Emails" option added.
  • Dev - "Automatically Generate SKU for New Products" option added.
  • Dev - "Reset Section Settings" option added.
  • Dev - WP_Query optimized to return ids only.
  • Tweak - Plugin link updated from coder.fm to wpcodefactory.com.
  • Tweak - general section cleanup.
  • Tweak - Default values added to all get_option() calls.
  • Tweak - Filter rewritten.

1.1.3 - 2016-12-21

  • Fix - load_plugin_textdomain() moved from init hook to constructor.
  • Fix - Generating SKU on "duplicate product" action.
  • Dev - Language (POT) file updated.

1.1.2 - 2016-08-21

  • Dev - "Allow duplicate SKUs" option added.
  • Dev - Version system added.
  • Tweak - Plugin renamed.
  • Tweak - Contributors changed.
  • Tweak - Option filter added.

1.1.1 - 2016-06-13

  • Dev - get_available_variations replaced with get_all_variations.
  • Dev - SKU Regenerator tool - No auto preview after generation.

1.1.0 - 2016-06-10

  • Dev - Sequential SKU number format option added.
  • Dev - Language (POT) file added.
  • Dev - Multisite support added.
  • Dev - Description added to "SKU Format Options".

1.0.0 - 2015-08-06

  • Initial Release.