How to Generate Barcodes and QR Codes in WooCommerce
Choose the right product identifier, print it as a barcode or QR code, and use scanning to connect products, orders and warehouse paperwork.
To generate a barcode for a WooCommerce product, start with the value it should contain: usually the manufacturer’s GTIN or your own SKU. Then turn that saved value into a printable label. In Stokkap, you can choose an existing GTIN or SKU as the source for a product barcode; in the app, you can also print it as a QR code.
If your supplier already puts a barcode on the product, use that code wherever possible. You may only need to save or link it to the right WooCommerce product, rather than create another label.
Generating a number and generating a label are different
“Barcode generator” can describe two separate jobs:
- Assigning an identifier: deciding which unique value belongs to a product. This might be an officially allocated GTIN for retail distribution, or an internal SKU such as
SHIRT-M-001. - Rendering a label: drawing that existing value as bars or a QR code so a scanner can read it.
Printing an image does not register a new retail identifier. Equally, saving a GTIN in WooCommerce does not, by itself, print a label.
| Term | What it means | Where it fits |
|---|---|---|
| GTIN / EAN / UPC | Standard retail product identifiers. EAN and UPC also name familiar retail barcode formats. | Identifying the same trade item across suppliers, stores and sales channels. |
| SKU | Your store’s product or variation reference. | Internal lookup, stock handling and labels. |
| Code 128 | A linear barcode format that can encode numbers and letters. | Printing a saved SKU or numeric code as a traditional barcode. |
| QR code | A two-dimensional code that can carry text, including a product identifier. | Labels read with a phone camera or compatible 2D scanner. |
The same SKU can be printed as Code 128 and as QR. The picture changes; the value used to find the product stays the same.
Use supplier barcodes first; get new retail identifiers from GS1
For an existing branded product, check the packaging and ask your supplier for the manufacturer’s product code. Confirm that it belongs to the exact size, pack quantity and version you sell. Keeping that identifier makes it easier to match the product when receiving stock or looking up an item already on the shelf.
If you own the brand and need new EAN/UPC identifiers for retail distribution, start with GS1 and your local GS1 organisation. Examples include GS1 UK and GS1 US. GS1 US provides Data Hub tools for managing licensed product identifiers and creating barcode images.
An online image generator can draw a barcode from a number you enter. That alone does not make the number a GS1-issued GTIN. For internal stock labels, a unique SKU may be all you need; for retailer or marketplace listings, check that channel’s identifier and barcode requirements.
What WooCommerce stores: GTIN versus SKU
WooCommerce now includes a native GTIN, UPC, EAN, or ISBN field. It stores the identifier, rather than providing a complete label-printing workflow. WooCommerce’s variation documentation describes this field as accepting numbers and hyphens. It is intended for standard product identifiers, rather than general text such as SHIRT-M-001.
This is separate from Code 128, the barcode format you may have in mind. Code 128 supports alphanumeric values; a numeric GTIN field does not mean WooCommerce cannot be used with Code 128 labels. Save your internal reference in SKU, then use a label tool to encode that value. See the Code 128 renderer documentation for supported characters.
You have flexibility when choosing SKUs, but avoid treating “any text” as a promise that every barcode format can print it. Short, unique references made from ordinary letters, numbers and hyphens are practical for internal labels. Keep identifiers as text when importing them so leading zeroes survive.
A numeric value is not the same thing as a retail barcode format. Printing a GTIN as Code 128 can be useful inside your warehouse. It does not turn that image into an EAN-13 or UPC-A symbol. Use the format required by the retailer or checkout system when preparing retail packaging.
Give each variation its own barcode
We recommend assigning the barcode to the specific variation, rather than the variable parent product. A medium shirt and a large shirt need to lead staff to different stock records, even when they share the same product page.
For example, save SHIRT-M-001 on the medium variation and SHIRT-L-001 on the large variation, or use each variation’s manufacturer-supplied GTIN. Print each label from the matching variation.
WooCommerce can inherit a parent SKU or GTIN when a variation’s field is empty. For scanning stock, give each variation its own identifier instead of relying on that fallback. Simple products can have their own code directly.
How to generate product barcodes in WooCommerce
Generate a barcode from a number or SKU
Stokkap’s WooCommerce barcode generator turns a saved product identifier into a printable symbol. To generate a barcode from a number already assigned to the item, use its saved GTIN as the source. For an internal reference containing letters and numbers, choose SKU. The printed code contains that selected value, so scanning can match it back to the product.
From WooCommerce with the Stokkap plugin
- Save the product’s existing GTIN or a unique SKU. For a variable product, work with the individual variation.
- Open the Stokkap product-label printing controls in WooCommerce.
- Choose whether the barcode should encode the saved GTIN or SKU.
- Preview the label, check the value and print a sample before printing the full batch.
The plugin renders the value you selected. It does not issue a new GS1 identifier. A product without a GTIN can still have an internal label generated from its saved SKU.
From the Stokkap app
- Find the product through Scan, or open its product detail page.
- Use the label-printing option and select the available GTIN or SKU source.
- Choose a traditional barcode or a QR code.
- Print a sample and scan it back into the app. Check that the correct product or variation opens.
Any product or variation can have a label once it has a suitable saved identifier. An empty GTIN field is not a blocker if there is a usable SKU to print. For the wider scanning workflow, see the barcode scanning guide or the WooCommerce barcode scanner plugin overview.
Print barcode labels on A4 sheets or a label printer
The app includes seven built-in label layouts: two Zebra sizes (2.25 × 1.25 inches and 4 × 6 inches), Brother 34 × 24 mm, Dymo 30252 and 30336, and two A4 sheet layouts (24 or 8 labels per page). These cover common thermal-label and sheet-printing setups. Printing uses your device’s print system, so choose a printer and matching paper size available there.
For other label stock, choose Custom size, enter a name, width and height in millimetres, and save the format for reuse. Set 1–100 copies per label, choose which details to include—such as product name, SKU, GTIN, price or a custom title—and adjust padding and barcode scale in the advanced options.
Need a barcode with a product name? Include the product name on the label, or add a custom title for a short description. That readable text is separate from the GTIN or SKU encoded in the barcode.
Match the label dimensions in Stokkap to your printer settings, and check a sample before printing a batch. A saved layout specifies the label size; printer availability still depends on your device and installed printer setup.
Already have a barcode, but no GTIN saved?
Scan the code already on the packaging. If Stokkap cannot find it, use Link to product and choose the existing product or variation it belongs to. Confirm the item before saving the link, including the size or pack quantity.
This connects a physical label to your catalogue without creating another product. It is particularly useful when a supplier’s barcode was never entered into WooCommerce. If there is no physical code to scan, assign a suitable SKU first and print a label from it.
Should you print a barcode or a QR code?
If staff mainly scan with mobile cameras, QR codes are a useful choice. They give you a compact label option, and Stokkap’s app can read them. Traditional barcodes remain a practical choice when staff mainly use dedicated barcode readers or when you want to reuse the linear codes already on products.
Check the reader before changing formats: a 1D-only scanner cannot read QR codes. For QR, use the app’s camera or a compatible 2D scanner. Phone cameras can also read supported linear barcodes, so test both formats with your actual label size, printer and lighting.
For product lookup, encode the saved product identifier. A QR code does not have to contain a website address. A QR label containing your SKU serves a different purpose from a marketing QR code that opens a product URL in a browser.
Order and pick-list barcodes: find the job from the paperwork
Product barcodes identify items. Order barcodes identify an order. Stokkap can show them on order detail and print them on its packing slips and pick lists. Enable the relevant options under store settings → Fulfilment → Order barcodes.
Imagine a parcel has been set aside and all you have is its packing slip. Scan the order barcode with your phone camera in the app, or with a compatible barcode reader connected to the Scan page. You can then open the order or create a pick list; where a list already exists, the action can open that list. Available actions depend on staff permissions and whether the relevant store features are enabled.
Printed pick lists can also include order barcodes. Staff can use the paperwork to quickly look up the related order rather than type its number. When picking or packing, scan the product codes to identify the actual items; the order barcode provides the order context.
Stokkap’s order code uses the form STK-ORD-12345, based on the numeric order ID. It is separate from a product’s GTIN or SKU. These print options apply to Stokkap documents; third-party packing-slip templates may need their own integration. See Managing Users for access controls.
Before printing a batch
- Check the source: use the supplier’s existing code where possible, or a deliberate internal SKU.
- Check the variation: each physical size or other stock-managed option should resolve to the correct record.
- Check uniqueness: avoid reusing an identifier across different sellable items.
- Check the print: keep strong contrast and clear space around the symbol; avoid shrinking it until the bars or squares merge.
- Check the result: scan a real printed label using the device staff will use, and confirm both the decoded value and the item it opens.
Start with one product and one label. Once the source value, format and scanner work together, use the same approach across your catalogue.
Stokkap Team