Documentation for the EAN and Barcodes for WooCommerce plugin.

Settings

Once installed and activated you can access the plugin’s settings from “WooCommerce > Settings > EAN”.

Here is a list of all the sections under the settings, we will look at each option one by one.

EAN Options

Barcode Options

Print Options

Advanced Options

General EAN Options

General EAN settings are located in “WooCommerce > Settings > EAN > General”.

EAN and Barcodes for WooCommerce - General Options

Type

The “Type” will be used for: EAN validation (on the admin product edit pages, and in the admin products column), EAN input pattern (on the admin product edit pages), product structured data (e.g. for Google Search Console), outputting 1D barcodes. Possible values: Automatic (EAN-13, UPC-A, EAN-8, ISBN-13, JAN); EAN-8; UPC-A; EAN-13; ISBN-13; JAN; Custom.

Default value: EAN-13

Title

This title will be used for the EAN input fields on admin product edit pages, in the admin products list column, etc. If you are using UPC for example, you can simply change the title here. This will help both admins/managers and customers to better understand the product identifier code.

Default value: EAN

Admin product edit page > Position

Set to which product data tab EAN field should be added. Position Possible values: General; Inventory; Inventory: SKU; Advanced.

Default value: Inventory: SKU

An example of the product edit page is shown below, we added the EAN to the general tab in this case:

EAN - General WooCommerce Product Tab
Edit Product
Admin product edit page > Check if valid

This will check if product EAN is valid.

Default value: yes

Admin product edit page > Check if unique

This will check if product EAN is unique in your shop.

Default value: no

Admin product search

This will enable searching by EAN in the admin area. This is an extremely useful option for inventory management.

Default value: yes

EAN - Admin WooCommerce Product Search
Admin Product Search
Admin product search > AJAX search

This will enable searching by EAN in AJAX. E.g. when searching for a product when creating new order in admin area.

Default value: yes

Admin products list column

This will add the “EAN” column to the admin products list.

Default value: yes

EAN - Admin WooCommerce Products List Column
Admin Products List Column
Admin products list column > Validate

Validate EAN in column. Invalid EANs will be marked red. This feature can quickly allow you to identify any invalid EANs and take appropriate action.

Default value: no

Admin product duplicate

This will copy EAN on admin “Duplicate” product action.

Default value: yes

Single product page

This will show EAN on single product page on frontend.

Default value: yes

Single product page > Template

Available placeholder: %ean%.

Default value: EAN: %ean%

Single product page > Positions

You can select multiple positions at once. Possible values: Product meta start; Product meta end; Before single product; Before single product summary; Single product summary; After single product summary; After single product; Product additional information tab.

Default value: Product meta start

Single product page > Position priority

Fine-tune the position.

Default value: 10

Single product page > Variable products

Position in variation. Possible values: Product meta; Description.

Default value: Product meta

Shop pages

This will show EAN on shop (e.g. category) pages on frontend. Please note that for the variable products, main product’s EAN must be set.

Default value: no

Cart

This will show EAN on the cart page on the frontend.

Default value: no

Search

This will enable searching by EAN on the frontend.

Default value: yes

Search > “Flatsome” theme

This will enable searching by EAN in the “Flatsome” theme’s “LIVE SEARCH”.

Default value: no

Product structured data

This will add EAN to the product structured data, e.g. for Google Search Console. This is extremely useful if you are going to run Google Shopping ads or other similar search ads.

Default value: yes

Product structured data > “Rank Math SEO” plugin.

This will add EAN to the product structured data generated by the Rank Math SEO plugin.

Default value: no

Product structured data > Automatic key

If enabled, will use the key based on EAN type, i.e. gtin8 for EAN-8, gtin12 for UPC-A, gtin13 for EAN-13, ISBN-13, and JAN, and gtin for all other types.

Default value: yes

Product structured data > Custom key

Ignored, unless the “Automatic key” option above is disabled.

Default value: gtin

Orders & Emails Options

Settings are located in “WooCommerce > Settings > EAN > General > Orders & Emails”.

EAN and Barcodes for WooCommerce - Orders and Emails Options

Orders

Allows you to automatically add EANs to new order items meta.

Default value: no

Orders: Admin order

Add EAN to new order items meta for orders created by admin.

Default value: no

Order items table > Pages

This will show EAN in order items table on pages. E.g.: “thank you” (i.e. “order received”) page, “view order” page (in “my account”).

Default value: no

Order items table > Emails

This will show EAN in order items table in emails. You can limit it to the specific emails in the “Emails list” option below.

Default value: no

Order items table > Emails list

Leave empty to add to all emails. Ignored unless the “Emails” option above is enabled. Possible values: New order; Cancelled order; Failed order; Order on-hold; Processing order; Completed order; Refunded order; etc.

Default value: None

Order items table > Template (HTML)

Available placeholder(s): %ean%.

Default value:

<ul class="wc-item-meta"><li><span class="sku_wrapper ean_wrapper">EAN: <span class="ean">%ean%</span></span></li></ul>
Order items table > Template (Plain text (emails only))

Available placeholder(s): %ean%, %new_line%

Default value:

%new_line%- EAN: %ean%

REST API Options

Settings are located in “WooCommerce > Settings > EAN > General > REST API”.

EAN and Barcodes for WooCommerce - REST API

Products

Add EAN to each product object in REST API responses. E.g.:

https://example.com/wp-json/wc/v3/products/123

Default value: no

Search by EAN

Search products by EAN. E.g.:

https://example.com/wp-json/wc/v3/products?ean=7980441417892

* Alternatively, you can enable the “Search > This will enable searching by EAN on frontend” option, and then search using the default search parameter. E.g.:

https://example.com/wp-json/wc/v3/products?search=7980441417892

Default value: no

Orders

Add EAN to each order object in REST API responses. E.g.:

https://example.com/wp-json/wc/v3/orders/465

Default value: no

Search by EAN

Search orders by EAN. E.g.:

https://example.com/wp-json/wc/v3/orders?ean=7980441417892

* Please note that the “Orders > Add EAN to new order items meta” option must be enabled.

Default value: no

Compatibility Options

Settings are located in “WooCommerce > Settings > EAN > Compatibility”.

EAN and Barcodes for WooCommerce - Compatibility Options

Point of Sale for WooCommerce

This will add EAN to the product search of the Point of Sale for WooCommerce plugin. Please note that “WooCommerce > Settings > EAN > General > Search” option must be enabled as well.
* To enable searching with a scanner, add “EAN” field to the “Scanning Fields” option in “Point of Sale > Settings > Register”.

Default value: no

Print Invoice & Delivery Notes for WooCommerce

This will show EAN in PDF documents of the Print Invoice & Delivery Notes for WooCommerce plugin.

Default value: no

WooCommerce PDF Invoices & Packing Slips

This will show EAN in PDF documents of the WooCommerce PDF Invoices & Packing Slips plugin.

Default value: no

WooCommerce PDF Invoices & Packing Slips > Position

Possible values: Before item meta; After item meta.

Default value: After item meta

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels

This will show EAN in PDF documents of the WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels plugin.

Default value: no

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Content

You can use shortcodes here.

Default value:

<p>EAN: [alg_wc_ean]</p>
WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Position

Possible values: Before item name; After item name; Before item meta; After item meta; As a separate column.

Default value: After item meta

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Documents.

Can be a comma-separated list, e.g.:

invoice,packinglist,deliverynote,dispatchlabel

Default value: None

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column title

Used only if the “Position” option is set to the “As a separate column”.

Default value: EAN

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column HTML class

Used only if the “Position” option is set to the “As a separate column”.

Default value: wfte_product_table_head_ean wfte_text_center

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column HTML style

Used only if the “Position” option is set to the “As a separate column”.

Default value: None

WooCommerce Customer / Order / Coupon Export

This will add item_ean column to the order items export of the WooCommerce Customer / Order / Coupon Export plugin.

Default value: no

Dokan

This will show EAN in vendor product form of the Dokan plugin.

Default value: no

Dokan > Title

Default value: EAN

Dokan > Placeholder

Default value: Product EAN...

WCFM

This will show EAN in product forms of the WCFM and WCFM Marketplace plugins.

Default value: no

WCFM > Title

Default value: EAN

WCFM > Placeholder

Default value: Product EAN...

WCFM > Hints

Default value:

The International Article Number (also known as European Article Number or EAN) is a standard describing a barcode symbology and numbering system used in global trade to identify a specific retail product type, in a specific packaging configuration, from a specific manufacturer.

Barcode Options

There are two separate similar settings sections: one for one-dimensional barcodes, and another for two-dimensional: “WooCommerce > Settings > EAN > Barcodes” and “WooCommerce > Settings > EAN > 2D barcodes”.

EAN and Barcodes for WooCommerce - Barcodes - General Options

Barcodes

Enables/Disables 1D/2D barcodes sections.

Default value: no

Admin product edit page

Show barcode image on admin product edit page.

Default value: no

Admin products list column

Add barcode column to admin products list.

Default value: no

Admin products list column > Column title

Sets column title.

Default value: Barcode or 2D barcode

Admin products list column > Column template

You should use [alg_wc_ean_barcode] shortcode here.

Default value:

[alg_wc_ean_barcode content="ean" w="1" h="15" children="yes"]
Single product page

Show barcode image on single product page on frontend.

Default value: no

Single product page > Variable products: Position in variation

Possible values: Product meta; Description.

Default value: Product meta

Shop pages

Show barcode on shop (e.g. category) pages on frontend. Please note that for the variable products, main product’s EAN must be set.

Default value: no

Cart

Show barcode on cart page on frontend.

Default value: no

Cart > Template

You should use [alg_wc_ean_barcode] shortcode here.

Default value:

[alg_wc_ean_barcode before='<span class="sku_wrapper ean_barcode_wrapper"><span class="ean_barcode">' after='</span></span>']

Barcode Options: Orders & Emails

EAN and Barcodes for WooCommerce - Barcodes - Orders and Emails Options

Orders

Show barcode image on admin order edit page.

Default value: no

Orders > Template

Sets template.

Default value:

<p>[alg_wc_ean_barcode_2d]</p>
Order items table > Pages

Show barcode image in order items table on pages. E.g.: “thank you” (i.e. “order received”) page, “view order” page (in “my account”). Pages

Default value: no

Order items table > Emails

Show barcode image in order items table in emails. You can limit it to the specific emails in the “Emails list” option below. Please note that this option won’t work on localhost environment.

Default value: no

Order items table > Emails list

Leave empty to add to all emails. Ignored unless the “Emails” option above is enabled. Possible values: New order; Cancelled order; Failed order; Order on-hold; Processing order; Completed order; Refunded order; etc.

Default value: None

Barcodes: REST API

EAN and Barcodes for WooCommerce - Barcodes - REST API Options

Products

Add barcode (base64) to each product object in REST API responses. E.g.:

https://example.com/wp-json/wc/v3/products/123

Default value: no

Orders

Add barcode (base64) to each order object in REST API responses. E.g.:

https://example.com/wp-json/wc/v3/orders/465

Default value: no

Template

Used for both “Products” and “Orders” REST API responses.

Default value:

[alg_wc_ean_barcode_base64 before="data:image/png;base64,"]

Barcodes Options: Compatibility

Settings are located in “WooCommerce > Settings > EAN > (2D) Barcodes > Compatibility”. Please note that “(2D) Barcodes > Enable section” option must be enabled.

EAN and Barcodes for WooCommerce - Barcodes - Compatibility Options

Print Invoice & Delivery Notes for WooCommerce

Show barcode image in PDF documents of the Print Invoice & Delivery Notes for WooCommerce plugin.

Default value: no

WooCommerce PDF Invoices & Packing Slips

Show barcode image in PDF documents of the WooCommerce PDF Invoices & Packing Slips plugin.

Default value: no

WooCommerce PDF Invoices & Packing Slips > Position

Possible values: Before item meta; After item meta.

Default value: After item meta

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels

Show barcode image in PDF documents of the WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels plugin.

Default value: no

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Content

You need to use shortcodes here.

Default value:

<p>[alg_wc_ean_barcode]</p>
WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Position

Possible values: Before item name; After item name; Before item meta; After item meta; As a separate column.

Default value: After item meta

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Documents

Can be a comma-separated list, e.g.:

invoice,packinglist,deliverynote,dispatchlabel

Leave empty to include in all documents.

Default value: None

WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column title

Used only if the “Position” option is set to the “As a separate column”.

Default value:

Barcode
WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column HTML class

Used only if the “Position” option is set to the “As a separate column”.

Default value:

wfte_product_table_head_ean wfte_text_center
WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels > Column HTML style

Used only if the “Position” option is set to the “As a separate column”.

Default value: None

WooCommerce Customer / Order / Coupon Export

This will add item_barcode column to the order items export of the WooCommerce Customer / Order / Coupon Export plugin.

Default value: no

WooCommerce Customer / Order / Coupon Export > Content

You need to use shortcodes here.

Default value:

[alg_wc_ean_barcode_base64 before="data:image/png;base64,"]
Dokan

This will show barcode in vendor product form of the Dokan plugin.

Default value: no

Dokan > Title

Field’s title.

Default value:

Barcode
Dokan > Content

Field’s content. You need to use shortcodes here.

Default value:

[alg_wc_ean_barcode]

Advanced Barcodes Options

EAN and Barcodes for WooCommerce - Barcodes - Advanced Options

Barcode type

If set to “Automatic”, will use the barcode type based on EAN type, i.e. EAN-8 for EAN-8, UPC-A for UPC-A, EAN-13 for EAN-13, ISBN-13 and JAN, and CODE 128 for all other types. Possible values: Automatic; EAN-8; UPC-A; EAN-13; CODE 128.

Default value: Automatic

Suppress errors

Suppress PHP errors when generating barcode.

Default value: yes

Print Options

Print (PDF) settings are located in “WooCommerce > Settings > EAN > Print”.

EAN and Barcodes for WooCommerce - Print - General Options

Print barcodes (PDF)

This will add “Print barcodes” to the “Bulk actions” in admin products list.

Default value: no

Page orientation

Possible values: Portrait; Landscape.

Default value: Portrait

Unit

User measure unit. Used in “Page format: Custom: Width”, “Page format: Custom: Height”, “Cell width”, “Cell height”, “Top margin”, “Left margin”, “Right margin”, “Page break margin” options. Possible values: millimeters; centimeters; inches; points.

A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.

Default value: inches

Page format

E.g. letter, A4, custom, etc.

Default value: LETTER (8.5 x 11 inches)

Page format: Custom: Width

Set in value of the “Unit” option, e.g. inches. Ignored unless “Page format” option is set to “Custom”.

Default value: 0

Page format: Custom: Height

Set in value of the “Unit” option, e.g. inches. Ignored unless “Page format” option is set to “Custom”.

Default value: 0

Max barcodes per page

Sets the number of barcodes printed on a single page.

Default value: 12

Columns

Number of columns.

Default value: 2

Cell width

Set in value of the “Unit” option, e.g. inches.

Default value: 4

Cell height

Set in value of the “Unit” option, e.g. inches.

Default value: 1.5

Cell border

Possible values: No; Yes.

Default value: No

Top margin

Set in value of the “Unit” option, e.g. inches.

Default value: 1.13

Left margin

Set in value of the “Unit” option, e.g. inches.

Default value: 0.46

Right margin

Set in value of the “Unit” option, e.g. inches.

Default value: 0.31

Page break margin

Set in value of the “Unit” option, e.g. inches. Distance from the bottom of the page that defines the automatic page breaking triggering limit.

Default value: 0.79

Font

If you are having issues displaying your language specific letters, select “DejaVu Sans (Unicode)” font. Possible values: DejaVu Sans (Unicode); Times New Roman; Helvetica; Courier.

Default value: DejaVu Sans (Unicode)

Font size

Sets font size.

Default value: 11

Template

You should use shortcodes here:

  • [alg_wc_ean],
  • [alg_wc_ean_barcode],
  • [alg_wc_ean_barcode_2d],
  • [alg_wc_ean_product_image],
  • [alg_wc_ean_product_name],
  • [alg_wc_ean_product_price],
  • [alg_wc_ean_product_sku],
  • [alg_wc_ean_product_attr],
  • [alg_wc_ean_product_id],
  • [alg_wc_ean_product_meta],
  • [alg_wc_ean_product_function].

Default value:

[alg_wc_ean_barcode]<br>[alg_wc_ean]
Style

Defines style information (CSS) for the labels.

Default value: None

Variations

Possible values: Do not include; Add; Replace.

Default value: Do not include

Use stock quantity

Print separate label for each product inventory item.

Default value: no

Admin Print Options

EAN and Barcodes for WooCommerce - Print - Admin Options

Print buttons

Possible values: Products > Bulk actions; Single product; Single order.

Default value: Products > Bulk actions

Print buttons style

Applied to the “Single product” and “Single order” print buttons. E.g.:

font-size: 40px; width: 40px; height: 40px;

Default value: None

Variations print buttons

Applied to the “Single product” print buttons. Possible values: Variations tab; Meta box.

Default value: Variations tab

Advanced Print Options

EAN and Barcodes for WooCommerce - Print - Advanced Options

Skip products without EAN

Skip products without EAN when generating PDF.

Default value: yes

Use Print.js

Use Print.js library for printing PDFs.

Default value: yes

Suppress errors

(recommended) Suppress PHP errors when generating PDF.

Default value: yes

Advanced Options

EAN and Barcodes for WooCommerce - Advanced Options - General

Meta key

Sets main plugin meta key.

Default value: _alg_ean

JS selector in variation

This is used only if “Variable products: Position in variation” option is set to “Product meta”. Leave at the default value if unsure.

Default value: .summary

Force remote image

Forces remote images in “Barcodes > Order items table > Pages”. Please note that this option won’t work on localhost environment.

Default value: no

Export/Import Plugin Settings

EAN and Barcodes for WooCommerce - Advanced Options - Export Import

Export

Check the box and “Save changes” to export.

Import

Choose file and “Save changes” to import.