SKU Generator for WooCommerce

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

Author: Tom Anbinder SKU: N/A Category: Tag: Version: 1.2.1; Last updated: 9 months ago; Requires WordPress version: 4.4; Tested up to: 4.9


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

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.

Admin Settings – SKU Format Options

SKU Generator for WooCommerce - SKU Format Options

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.

Admin Settings – More Options

SKU Generator for WooCommerce - More Options

Admin Settings – Categories Options

SKU Generator for WooCommerce - Categories Options

Admin Settings – Tags Options

SKU Generator for WooCommerce - Tags Options

Admin Settings – 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();

Prices & Licenses

Single siteUnlimited sites
1 year$19.99$49.99 $21.99
Lifetime$49.99 $26.99$99.99 $36.99


There are no reviews yet.

Be the first to review “SKU Generator for WooCommerce”

19 thoughts on "SKU Generator for WooCommerce"

  1. kharlo November 27, 2017 at 8:20 am #

    Hello, I purchased the plugin and I’d like tu use the category prefix.
    I’ve set a prefix for every category and using a sequential number generation.
    I have this template: {category_prefix}00{sku_number}
    But instead of “AB0012345”, I have “0012345”, the category prefix doesn’t show up.
    Can you please explain what to do?
    Thank you very much!


    • Tom Anbinder November 27, 2017 at 5:43 pm #

      Hi Kharlo,

      Does this problem occur when you add new product or when you are using “SKU Regenerator” tool?

      Best regards,


      • kharlo November 27, 2017 at 8:42 pm #

        Hello Tom,
        It occurs when I add a new product. I don’t want to regenerate SKUs because I need to keep the existing ones.


      • kharlo December 1, 2017 at 11:22 am #

        Excuse me Tom,
        I don’t understand what is the problem. It’s not a secondary function not working here, it’s the reason why I have purchased the payed version of the plugin. I’m still waiting for support.
        If you can’t support me, can you please tell me how the refund policy works?
        Thank you very much, best regards


        • Tom Anbinder December 6, 2017 at 6:06 pm #

          Hi Kharlo,

          We’ve released new version 1.2.1 today, which should solve the issue with new products not getting category prefix.

          Now in plugin’s “General” settings (in “WooCommerce > Settings > SKU > General”) in “More Options” section, we’ve added “Delay SKU generation till product is published” checkbox. When it is enabled, SKU is not created until you publish the product, so you have time to set category, so prefix is generated correctly.

          Best regards,


          • studiosight December 15, 2017 at 4:12 pm #

            This still doesn’t work for me. Kharlo, any luck?

  2. Diego December 26, 2017 at 12:35 pm #


    I am testing this plugin ( free version at this time ). I noticed that when I set a prefix/suffix for a category, this takes the first category. In my case, most of the products are part of different categories. Is there any possibility that the prefix/suffix used for generate the SKU takes the Primary Category?

    Is this a PRO option? If is, I will buy the plugin for sure.



    • Tom Anbinder December 30, 2017 at 12:47 am #

      Hi Diego,

      Thanks for the idea. Unfortunately at the moment even Pro version will always take first category. Hopefully this will be easily fixable – please five me 1-2 days to release new plugin version with this option added.

      Best regards,


      • Diego December 30, 2017 at 8:33 am #

        Hi Tom,
        Thank you for the reply.
        I found a way to the plugin take my primary category first that is add numbers at the begining of the category ( also did thid with the tags ) doing this, my primary category always appear first, but this is not a real solution.
        If you can add the possibility to choose which category show first/Second and so on, also in case of the Tags, I think the plugin will be more helpful.
        I am using right now with this “customization “ and it works really well.


  3. mohamad April 7, 2018 at 8:24 am #

    is this plugin is maintained and will be future updates in case of woocommerce future compatibility issue exist? i would like to give support by purchasing this pro version


    • Tom Anbinder April 7, 2018 at 4:25 pm #

      Hi Mohamad,

      Yes, the plugin is supported. If you notice any issues on future WooCommerce updates – please let us know and we’ll try to fix it as soon as possible.

      Hope that helps. Please let me know if you have any more questions.

      Best regards,


  4. Justin April 12, 2018 at 4:44 pm #

    Hi Tom,

    A client is using this plugin on their store and in our testing it appears to prevent a search query such as “?s=search&post_type=product” from working properly (where search = the search term”. Our goal is to use the Shop archive layout to display the store search results and it comes back with: “No products were found matching your selection.” Without the plugin activated the search works as expected.

    Testing: SKU Generator for WooCommerce Pro v1.2.1 on WooCommerce 3.3.5 with WordPress 4.9.5

    Could you have a look and see if it is something that could be patched.



    • Tom Anbinder April 13, 2018 at 12:49 pm #

      Hi Justin,

      I will have to re-check that, but for a start – if it’s enabled, could you please try disabling “Search by SKU” checkbox in plugin’s settings (in “WooCommerce > Settings > SKU > General”), and let me know if that fixes the issue?

      Best regards,


      • Justin April 13, 2018 at 1:20 pm #

        Hi Tom,

        Thanks for your quick reply! I’ve disabled the “Search by SKU” setting and that does it. Search is working normally with the plugin enabled, thanks!

        Best Regards,


  5. Chris April 16, 2018 at 8:03 am #

    I use Toolset to manage custom fields etc on my site and need to use a couple of these custom fields to generate the SKU for products. Is your plugin compatible with this functionality.
    Many thanks


  6. logicash June 27, 2018 at 8:26 am #

    I use the pro version recently with a letter suffix for variation.
    But some time it’s work and many time not.
    The variant sku are the same as the product without the letter suffix on a majority of product..
    I don’t have other plugin activated for sku.

    Wath wrong ?
    Thanks for help


    • Tom Anbinder June 28, 2018 at 3:23 pm #


      Are you using SKU tool to add SKUs for existing products, or are you adding SKU automatically, when adding new product? If it’s the latter – you should enable “Delay SKU generation till product is published” checkbox in plugin settings, so SKU won’t be added too early, when variations are not yet created.

      Hope that helps.

      Best regards,


      • Olivier MATHIEU July 28, 2018 at 1:14 pm #

        I try your tips (Delay SKU Generation) but the problem remains.
        Some product don’t have SKU on te variant with letter prefix.
        All The products are created with the same process.

        Your plugin seem not compliant with variant usage.

        Olivier M.


  7. lokesh kumar August 2, 2018 at 6:44 am #

    Hi Support ,

    I has checked you have mention on SKU Generator for WooCommerce plugin description “Add product searching by SKU on frontend” . So i was installed the free available version of the SKU Generator for WooCommerce plugin and also checked the checked box option for Search by SKU in the plugin setting but its not working with default wp search . Could you please let me know on which version (free or pro ) this sku serach on frontend feature available and its work with default wp search or any other ?

    Thanks !


Leave a Reply


= 1.2.1 - 06/12/2017 =
* 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 - 18/04/2017 =
* 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 to
* Tweak - general section cleanup.
* Tweak - Default values added to all get_option() calls.
* Tweak - Filter rewritten.

= 1.1.3 - 21/12/2016 =
* 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 - 21/08/2016 =
* Dev - "Allow duplicate SKUs" option added.
* Dev - Version system added.
* Tweak - Plugin renamed.
* Tweak - Contributors changed.
* Tweak - Option filter added.

= 1.1.1 - 13/06/2016 =
* Dev - get_available_variations replaced with get_all_variations.
* Dev - SKU Regenerator tool - No auto preview after generation.

= 1.1.0 - 10/06/2016 =
* 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 - 06/08/2015 =
* Initial Release.


  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to Admin Dashboard > Plugins > Add New > Upload Plugin and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.


To keep WPCodeFactory items up to date, please install WPCodeFactory Helper plugin and enter your site key.