Product Code for WooCommerce


This is a user-friendly plugin that many website designers, developers, and business owners look for when they require an additional product code field. It is often used for an inventory control number, internal stock number or a bin location. The plugin allows you to add a product identifier to each or some variable or single items in Woocommerce. The custom field value can be passed through during order fulfillment, referenced from each item ordered. The field value can be viewed user side if desired, or turned off if not.

A unique product code is often added in addition to the GTIN, EAN, SKU and UPC throughout the order process. However, all current plugins that might address this need entail complex setups and functions which result in extra memory usage, system conflicts and frequent updates. This plugin eliminates all those hurdles by providing a simple solution without excessive options.

Simply install, enter your product codes within each product post (variation or single) and publish. Nothing more to it than that! If you don’t want customers able to see the unique product code, the user side display can be turned off in setup. The field label can be easily changed in setup too, to read ISBN for example or Bin Number, Stock Number, EAN, or JAN. Any value can be create and entered as a single new field.

The added field is compliant to mappable data import and export schemes. This same compliance allows the field to be included in a Google Merchant product feed using the custom mapping. The plugin’s language support includes: English, Spanish and French. You may export your data fields as a JSON file for backup or you may import data if needed.

You can also search product codes using the wordpress default search from the user side as well as from administrator woocommerce product list page on the backend. It is now compatible to search product codes using the popular Relevanssi, SearchWP and, Ajax Search Pro.

Technical Details for Release 1.2.0

Load time: 0.339 s; Memory usage: 3.33 MiB
PHP up to tested version: 7.2.16
MySQL up to tested version: 8.0.15
cURL up to tested version: 7.66.0, OpenSSL/1.0.2u

Using in Multisite Installation

  1. Extract the zip file contents in the wp-content/mu-plugins/ directory of your WordPress installation. (This is not created by default. You must create it in the wp-content folder.) The ‘mu’ does not stand for multi-user like it did for WPMU, it stands for ‘must-use’ as any code placed in that folder will run without needing to be activated.
  2. Access the Plugins settings panel named ‘Product Code for WooCommerce’ under options.
  3. Enter the Product Code under the SKU from either Variable or Simple products.

Configuration with Relevanssi plugin

  1. Open up Indexing tab from Settings->Relevanssi page.
  2. From the Post Type select “Product” and “Product Variation”.
  3. From the Custom fields dropdown select “Some” and add custom fields “_product_code” and “_product_code_second” and save the settings.
  4. Move to Searching tab and unselect checkbox “Respect exclude_from_search” and save.
  5. Again move to Indexing tab and click button “Build the index” and lastly save.

Configuration with SearchWP plugin

  1. Open up Settings Tab from Settings->SearchWP page.
  2. Add post type “Product” if not added by clicking “Add Post Type” button.
  3. Click “Add Attributes”, select “Custom Fields” and add “_product_code” and “_product_code_second” fields from the dropdown box.
  4. Lastly save it and index it again.

Configuration with Ajax Search Pro plugin

  1. Open up “Ajax Search Pro” settings page via admin menu.
  2. Create/Edit the search instance.
  3. Add “Products[product]” and “Variation[product_variation]” from the post types list.
  4. Add “_product_code” and “_product_code_second” fields from the custom fields list and save.
  5. If you have selected “Index table engine” for the search engine then index it again.


  • The Product Code as found in a Simple Product
  • The Product Code as found in a Variable Product
  • The Product Code appears under the SKU on the user side
  • The Product Code appears below the description in the shopping cart
  • The Product Code appears below the SKU and Variation ID on the order page
  • The plugin's limited selection function settings panel


  1. Upload the plugin files to the ‘/wp-content/plugins/plugin-name’ directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Enter the Product Code under the SKU from either Variable or Simple products.


Is this plugin frequently updated to WordPress compliance?

Yes, attention is given on a staged installation with many other plugins via debug mode.

Is the plugin as simple to use as it looks?

Yes. No other plugin exists that adds an additional custom product code so simply.

Has there ever any compatibility issues?

To date, none have ever been reported.

Can the custom Product Code field be fed to Google Merchant?

We can’t possibly assure compatibility with every feed manager, but the properly built ones find the field correctly. We suggest using YITH Google Product Feed for WooCommerce Premium. The custom field appears as ‘Product Id [id]’ right on top of the custom field selections.

How do I export the Product Code field from WooCommerce?

We use WP All Export Pro by Soflyy which works great, but so does the free Advanced Order Export For WooCommerce By AlgolPlus.
– Click “Export Orders” under WooCommerce.
– Click to open “Set up fields to export”
– On the right click “Products”
– The field “[P] Product Id” is listed as the field to export from this plugin.

Can I export or backup my field data

You can export field data as JSON file. To do so, navigate to the settings section, then click ‘Download Settings’.

How can I import my field data

You can import field data from a saved JSON file. To do so, navigate to the settings section, then click ‘Import Settings’. Choose your JSON file & click save changes, your field data will populate your meta tables.

Can I rename the Product Code field to another title?

Previously, the function.php required a snippet addition to do so. As of version 1.0.6, in the settings panel you will find an option to edit the field title with a limit of 18 characters including spaces. Whatever title is entered will change on the user side and admin side and throughout the order process.

Is the code in the plugin proven stable?

Please click the following link to check the current stability of this plugin:


October 18, 2020
It gives you much needed flexibility woocommerce seem to not think about. Having additional meta fields in products is a must have. The developer manages improvement ideas excellently and implements it when possible. artiosmedia is a developer you can build on!
September 27, 2020
This plugin does, what it should do. Fine work, thank you!!!
September 9, 2020
I've been using WordPress for over 10 years now, and I have never ever had a Plug-in that did exactly what it said it would, or a plug-in that does just that. Plug-in! I mean it's meant to plug-in, not re-wire your entire f****** system and cause conflicts with basic code. Thank you. Thank you. Thank you. I will be hunting down the plug-ins you make and buy them!
May 16, 2020
Good and fast support, I wish we have chance to add more field than one.
April 6, 2020
Funciona perfecto, me sirvio mucho en mi proyecto web, gracias por el desarrollo y soporte rápido. Thank you very much to the developers.
Read all 10 reviews

Contributors & Developers

“Product Code for WooCommerce” is open source software. The following people have contributed to this plugin.



1.2.0 10/18/20
– Add second product code field and options
– Add script to merge two product meta values into one
– Add switch to hide userside fields when the value is empty
– Add JSON import/export settings option
– Update language files to include new fields
– Update sample screens to show new fields
– Update for WordPress 5.5.1
– Assure compliance with WooCommerce 4.6.0

1.1.0 05/15/20
– Fixed search error on administrator product list page.
– Updates for WordPress 5.4.1
– Assure compliance with WooCommerce 4.1.0

1.0.9 04/26/20
– Add search module for Relevanssi search

1.0.8 04/02/20
– Add search compliance including third party plugins
– Add search module for SearchWP search
– Add search module for Ajax Search Pro search
– Updates for WordPress 5.4
– Assure compliance with WooCommerce 4.0.1

1.0.7 02/02/20
– Updates for WordPress 5.3.2
– Assure compliance with WooCommerce 3.9.2
– Fix missing Product Code label upon install

1.0.6 12/11/19
– Updates for WordPress 5.3
– Assure compliance with WooCommerce 3.8.1
– Remove composer.json dependencies
– Add submenu access to setup
– Add ability to edit the field title
– Overall composition and text edits
– Fix language POTS not loading

1.0.5 11/09/19
– Updates for WordPress 5.2.4
– Modifications for WooCommerce 3.8.0
– Support for WooCommerce Admin 0.21.0
– Tested Compatible with WPML
– Adjust for WooCommerce API REST
– Current version support updated

1.0.4 08/15/19
– Updates for WordPress 5.2.2
– Modifications for WooCommerce 3.7.0
– Current version support updated

1.0.3 05/05/19
– Updates for WordPress 5.2
– Assure compliance for WooCommerce 3.6.2
– Current version support updated

1.0.2 04/03/19
– Update to allow WordPress search of Product Code fields
– Assure compliance for WooCommerce 3.5.7
– Current version support updated

1.0.1 02/01/19
– Fix bug that caused code duplication in some variations
– Current version support updated

1.0.0 01/15/19
– Initial release