Since WooCommerce 9.2 every product has a GTIN field in the Inventory tab, and every variation has one among its own settings; from 9.3 on, it is labelled GTIN, UPC, EAN, or ISBN. Put the number under the product’s barcode there (8, 12, 13 or 14 digits), leave it empty for products that have none. Our plugin sends g:gtin from the first valid GTIN in this field or in Google for WooCommerce, and leaves gtin out when neither holds one.
The field, and what it is not
WooCommerce’s 9.2 release notes describe it: a new field called global_unique_id, labelled “GTIN, UPC, EAN or ISBN”, added to the classic product editor for main products and variations, stored in its own column and enforced unique across the catalogue, the way a SKU is. Before 9.2 there was no such field in core; barcodes lived in plugin fields and custom meta, each feed plugin reading its own, and Google saw whatever happened to be mapped.
It is not the SKU. The SKU is your code for the product in your shop; the GTIN is the manufacturer’s code for the product everywhere, and Google validates it. WooCommerce keeps the two apart for that reason, and so should the feed: a SKU written into g:gtin is a disapproval, and a SKU written into g:mpn is a claim that your internal code is the manufacturer’s part number, which it is not.
What to enter
The number printed under the barcode, digits only. Google’s gtin specification accepts 8 digits (EAN-8), 12 (UPC-A), 13 (EAN-13, and ISBN-13) or 14 (ITF-14), and checks the last digit against the others, so a typo is caught. GS1 is the body that issues them; a real GTIN has a prefix registered there. Three habits keep the field honest:
Keep leading zeros. A UPC that starts with 0 is twelve digits with the zero; a spreadsheet that treats the column as a number drops it and produces an eleven-digit value Google rejects. Format the column as text before pasting.
One barcode per variation. The red Medium and the red Large have different GTINs. Fill the field on each variation; a value on the parent is only a fallback.
Nothing rather than something. No placeholders (0000000000000, N/A), no supplier codes, no barcode of a different pack size. An empty field is a valid state Google understands; a wrong value is not.
Products without a barcode
Google’s identifier_exists attribute indicates that unique product identifiers aren’t available for a product. Its page lists custom goods or one-of-a-kind products (custom T-shirts, art, handmade goods) and products produced before GTINs were introduced (vintage products, antiques, books published before 1970) as products that might not have them. Set to false, the attribute tells Google the product lacks a brand, GTIN or MPN; Google’s product data specification says to still provide the identifiers you have. Set to false on a product that has an internationally recognized unique identifier, it is reported as “Incorrect value [identifier_exists]”; Google’s product issues reference lists that issue. For products without an assigned GTIN (Google’s examples include store brand products), Google’s identifier overview says to provide brand and MPN instead.
How the field becomes a feed
Our free plugin reads the 9.2 field and the GTIN that Google for WooCommerce stores, for each variation first and then for its parent product, and writes g:gtin from the first valid one. A GTIN with a wrong length or check digit, or a placeholder such as all zeros, is left out. A product without a GTIN goes out without gtin and without identifier_exists, and the plugin never sends the SKU as an MPN. So the job on the WooCommerce side is filling the field where a barcode exists and leaving it empty where none does.
On Google’s side, a filled GTIN lets Merchant Center match your product to its catalogue entry, which is where richer listings and comparison placements come from; an empty one with the declaration runs without those; a missing one with no declaration can lead to “Limited performance due to missing identifiers”; and a malformed one is disapproved. Google’s gtin page says a product that has a GTIN assigned and is submitted without it could be disapproved.
Filling a whole catalogue
For a few dozen products, the product editor is fine. For hundreds, export the products to CSV, check whether your WooCommerce version’s exporter includes the GTIN column (export one product and look), fill the column from your supplier’s list with the column formatted as text, and import with “update existing products”. If the exporter does not carry the column yet, a bulk-edit plugin that exposes the field does the same job. Either way, run the free feed check on the feed afterwards: it validates every GTIN by length and check digit, treats invalid ones as missing, and counts the products still without one.
Questions merchants ask
I am on a WooCommerce version older than 9.2. Where does the GTIN go?
There is no core field before 9.2, so barcodes lived in plugin fields or custom meta. Update WooCommerce: the field arrives with the update and the feed plugins that read it start working. Moving existing values across is a one-off export and import.
Can I put the SKU in the GTIN field to get rid of the warning?
No. A SKU is your own code; a GTIN is the manufacturer’s, with a fixed length and a check digit. A SKU in the field is reported by Google as “Invalid value [gtin]” and disapproves the product.
My products are handmade. What goes in the field?
Nothing: leave it empty. Outside the media and apparel cases, Google's product data specification asks for identifier_exists set to no on a product that has no GTIN and no MPN with a brand. Our plugin does not send identifier_exists, and WooCommerce has no field that marks a product as having no identifiers. Without the attribute, Google takes the value as yes.
Does the field need to be filled on the parent or on the variations?
On the variations, when the product has them: each size and colour has its own barcode. The plugin reads the variation’s field first and falls back to the parent’s, so a parent-level value is used for variations that have none of their own.
Sources
WooCommerce’s 9.2 pre-release notes (the global_unique_id field), Variable Products documentation (the field per variation) and source code in versions 9.3.0 (the label) and 11.2.1 (the Inventory tab and a variation’s fields); Google Merchant Center Help on gtin, identifier_exists, unique product identifiers and the product data specification; Google’s Content API product issues reference; GS1 on the Global Trade Item Number; and the readme of FeedRobin Product Feed for WooCommerce.