EAN and Barcodes for WooCommerce

Author: WPFactory PluginsVersion: 4.9.3Updated: 4 days ago
Requires WordPress version: 4.4Tested up to WordPress version: 6.5

 


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.


Shortcodes

There are three shortcodes available in the plugin:

  • [alg_wc_ean]
  • [alg_wc_ean_barcode]
  • [alg_wc_ean_barcode_2d]

[alg_wc_ean]

[alg_wc_ean] shortcode outputs product’s EAN.

Attributes
product_id
(Optional) Product ID. If empty, will automatically retrieve the current product ID.
before
(Optional) Content to output before the EAN. E.g. EAN: . Default is empty.
after
(Optional) Content to output after the EAN. Default is empty.

[alg_wc_ean_barcode] and [alg_wc_ean_barcode_2d]

[alg_wc_ean_barcode] and [alg_wc_ean_barcode_2d] shortcodes output product’s 1D and 2D barcodes respectively.

Attributes
product_id
(Optional) Product ID. If empty, will automatically retrieve the current product ID.
before
(Optional) Content to output before the barcode. Default is empty.
after
(Optional) Content to output after the barcode. Default is empty.
children
(Optional) If set to yes, will output variations’ barcodes for a variable product. Default is no.
glue
(Optional) Used to “glue” the variations’ barcodes for a variable product. Used only if the children attribute is set to yes. Default is empty.
w
(Optional) Barcode width. Default is 2.
h
(Optional) Barcode height. Default is 30 for 1D barcodes, and 2 for 2D barcodes.
template
(Optional) Template. Default is %barcode_img%. Available placeholders: %barcode_img%, %product_id%, %product_title%, %value%.
content
(Optional) Sets what have to be encoded in the barcode. Default is ean. Available values are:

ean
Encode product EAN. You can override the product EAN with the ean attribute.
sku
Encode product SKU.
url
Encode product URL.
admin_url
Encode product admin URL. Please note that it will encode parent (i.e. variable) product URL for the variations.
admin_search
Encode product admin search URL.
increase_stock
Encode product increase stock action. You can set quantity with the stock_qty attribute (default is 1). max_stock attribute allows you to set limit for the action, i.e. action can’t increase the stock above the max_stock.
decrease_stock
Encode product decrease stock action. You can set quantity with the stock_qty attribute (default is 1). min_stock attribute allows you to set limit for the action, i.e. action can’t reduce the stock below the min_stock.
add_to_cart
Encode product add to cart action. You can set quantity with the qty attribute (default is 1). You can set user with the user_id attribute (default is 1).
add_to_cart_url
Encode product add to cart URL. Please note that there is no add to cart URL for a variable product, however, you can encode the add to cart URL for the variations.
ean
(Optional) Overrides product’s EAN. Used only if the content attribute is set to ean. Default is empty.
stock_qty
(Optional) Used only if the content attribute is set to decrease_stock or increase_stock. Default is 1.
min_stock
(Optional) Used only if the content attribute is set to decrease_stock. Default is empty.
max_stock
(Optional) Used only if the content attribute is set to increase_stock. Default is empty.
qty
(Optional) Used only if the content attribute is set to add_to_cart. Default is 1.
user_id
(Optional) Used only if the content attribute is set to add_to_cart. Default is 1.
Examples

This will output the 2D barcode for the current product:

[alg_wc_ean_barcode_2d]

This will output the 2D barcode for the selected product:

[alg_wc_ean_barcode_2d product_id="123"]

This will output the 2D barcode for the predefined EAN:

[alg_wc_ean_barcode_2d ean="5901234123457"]

This will encode and output current product URL in 2D barcode:

[alg_wc_ean_barcode_2d content="url"]

Tools

 

Tools are located in “WooCommerce > Settings > EAN > Tools”. Check the box and “Save changes” to run the tool. Please note that there is no undo for these tools.

Product Tools

Please note that Generate and Copy tools will not overwrite EANs for products with existing EANs. You can use the Delete tool to clear the existing EANs before generating or copying.

EAN and Barcodes for WooCommerce - Product Tools

Generate
Generate EAN for all products.

Default: no
Generate: Type
Possible values: EAN-8; UPC-A; EAN-13.

Default: EAN-13
Generate: Country prefix (from)
List of GS1 country codes.

Default: 200
Generate: County prefix (to) (optional)
If set, the plugin will generate the prefix randomly between “Prefix from” and “Prefix to” values.

Default: None
Generate: Seed prefix (optional)
Default: None
Generate: Automatically generate EAN for new products
Default: no
Generate: Automatically generate EAN on product update
Default: no
Copy product SKU
Copy EAN from product SKU for all products.

Default: no
Copy product SKU: Automatically copy SKU to EAN for new products
Default: no
Copy product SKU: Automatically copy SKU to EAN on product update
Default: no
Copy product ID
Copy EAN from product ID for all products.

Default: no
Copy product meta
Copy EAN from product meta for all products.

Default: no
Copy product meta: Meta key
Product meta key to copy from, e.g. _gtin.

Default: None
Assign from the list
Assign EAN from the list for all products.

Default: no
Assign from the list: List
EAN list to assign from. One EAN per line. Used (i.e. assigned) EANs will be automatically removed from the list.

Default: None
Delete
Delete all EANs for all products.

Default: no
“Products > Bulk actions”
Sets actions to be added to the “Products > Bulk actions” dropdown. Possible values: Generate EAN; Delete EAN.

Default: Delete EAN; Generate EAN

Product Actions

EAN and Barcodes for WooCommerce - Product Actions

Automatic actions: New product
Sets actions to be automatically performed when new product is added. New product Possible values: Disabled; Generate; Copy product SKU; Copy product ID; Copy product meta; Assign from the list.

Default: Disabled
Automatic actions: Update product
Sets actions to be automatically performed when the product is updated. Possible values: Disabled; Generate; Copy product SKU; Copy product ID; Copy product meta; Assign from the list.

Default: Disabled
Periodic action
Sets the action to be automatically performed on a periodic basis (for all products). Possible values: Disabled; Generate; Copy product SKU; Copy product ID; Copy product meta; Assign from the list.

Default: Disabled
Periodic action interval in seconds
Default: 3600
“Products > Bulk actions”
Sets actions to be added to the “Products > Bulk actions” dropdown. Possible values: Generate EAN; Delete EAN.

Default: Delete EAN; Generate EAN

Order Tools

EAN and Barcodes for WooCommerce - Order Tools

Add EANs
Add EANs to all order items.

Default: no
Delete EANs
Delete EANs from all order items.

Default: no

Developers

Plugin stores EANs in product meta with _alg_ean key. So if you’d need to access it directly:

$ean = get_post_meta( $product_id, '_alg_ean', true );

FAQ

Q. I am trying to add the EAN field to another plugin (e.g. product feed plugin), but I’m not able to find the EAN in the custom fields list there.

A. It looks like some plugins don’t “like” the starting underscore _ symbol in our _alg_ean meta key. So here is what you can do – in “WooCommerce > Settings > EAN > Advanced” you will find an option – “Meta key” – set it to something without the starting underscore symbol, e.g. alg_ean. Then set EAN for some product in your shop, and, after that, you should be able to select it in your other plugin.

If you still can’t find the EAN in the custom fields list, based on our experience, there are a couple of different solutions to it:

  • Some plugins are gathering new custom fields on a periodic basis. This means that after you change our meta key to a new one, and set the EAN for one of your products, you may need to wait for a while before the EAN will appear in the custom fields section.
  • Some plugins have some kind of a button to force new custom fields search – you may need to click it. For example, the WooCommerce Google Product Feed plugin has the “refresh the field list” link in “WooCommerce > Settings > Product Feeds”.
  • And, finally, some plugins are checking a number of the newest products to get custom fields, so the safest solution is to add the EAN to the latest product you have in your shop. For example, the Product Feed PRO for WooCommerce plugin checks five of your latest products.

Notes

  • After you change the key from _alg_ean to alg_ean, all your existing product EANs will disappear. If you want to keep them – there is a way – you need to use our “WooCommerce > Settings > EAN > Tools” section. There is a tool – “Product Tools > Copy product meta > Copy EAN from product meta for all products”. You need to set the “Meta key” option to the old key (i.e. _alg_ean) and run the tool – it will copy all old EANs to the new ones.
  • Some plugins (e.g. WooCommerce Google Product Feed) will work with our original meta key (with the underscore symbol) as well – look for the “EAN” field there (not _alg_ean).

Q. What GTIN types are supported?

A. Despite the (EAN) naming, the plugin supports all main product GTINs.

  • EAN-8 – A shorter version of the EAN-13 standard. Length: 8.
  • UPC-A – The most common type in the United States. Length: 12.
  • EAN-13 – The most commonly used EAN standard. Length: 13.
  • ISBN-13 – The International Standard Book Number (ISBN) is a numeric commercial book identifier. It’s a subset of EAN-13. Length: 13.
  • JAN – The Japanese Article Number (JAN) is a subset of EAN-13. Length: 13.
  • Custom – Custom can represent all 128 ASCII code characters (numbers, upper case/lower case letters, symbols, and control codes). Length: Any.

Q. What’s EAN?

A. 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. The same numbers can be referred to as GTIN. EAN barcodes are used worldwide for lookup at retail point of sale, but can also be used as numbers for other purposes such as wholesale ordering or accounting.


Changelog

4.9.3 - 15/04/2024

  • Security - Shortcodes - Sanitizing shortcodes output (wp_kses_post()).
  • Security - Shortcodes - [alg_wc_ean_product_meta] - Ensuring that only product meta is retrieved (get_post_meta() replaced with $product->get_meta()).
  • Tested up to: 6.5.
  • Readme.txt - Changelog - Truncated (full changelog moved to the changelog.txt file).

4.9.2 - 29/03/2024

  • Dev - Admin products list column - "Show duplicates" option added (defaults to yes).
  • WC tested up to: 8.7.
  • Readme.txt - Tags updated.

4.9.1 - 01/02/2024

  • Dev - Order Tools - "Search" tool added.
  • Dev - Admin settings - Tools - Section split: "Order Tools" section added.

4.9.0 - 30/01/2024

  • Dev - Advanced - Export/Import/Reset Plugin Settings - Import - Better data validation.
  • WC tested up to: 8.5.

4.8.9 - 06/01/2024

  • Dev - Orders - Now using "General > Title" for order item meta labels.

4.8.8 - 22/12/2023

  • Dev - Display - Single product page - Variable products: Position in variation - Description - Now checking if EAN is not empty.
  • WC tested up to: 8.4.

4.8.7 - 12/12/2023

  • Dev – PHP 8.2 compatibility – "Creation of dynamic property is deprecated" notice fixed.

4.8.6 - 29/11/2023

  • Dev - General - "Checkout" option added (defaults to no).

4.8.5 - 28/11/2023

  • Dev - General - Cart - "Template" option added.

4.8.4 - 27/11/2023

  • Fix - Pro - Print - Print buttons: Single order - HPOS compatibility.
  • WC tested up to: 8.3.

4.8.3 - 09/11/2023

  • Dev - Tools - Product Tools - Copy to product meta - "Meta sub key (optional)" option added.
  • Tested up to: 6.4.

4.8.2 - 20/10/2023

  • Dev - REST API - Orders - Add EAN to each order object in REST API responses - Extra checks added to prevent possible PHP warning.

4.8.1 - 19/10/2023

  • Dev - Admin settings - General - Admin product edit page - Add pattern - Description updated.
  • WC tested up to: 8.2.

4.8.0 - 05/10/2023

  • Dev - General - Admin product edit page - Add pattern - Default value changed to no.

4.7.9 - 25/09/2023

  • Plugin icon, banner updated.

4.7.8 - 25/09/2023

  • Fix - Admin settings - Compatibility - Google Listings & Ads - Typo fixed.

4.7.7 - 19/09/2023

  • Dev - Compatibility - Google Listings & Ads - Different approach implemented.

4.7.6 - 15/09/2023

  • Dev - Search - Code refactoring.
  • Dev - Pro - Extra Fields - "Admin product search" options added (default to no).
  • Dev - Pro - Extra Fields - "Search" (frontend) options added (default to no).
  • WC tested up to: 8.1.

4.7.5 - 05/09/2023

  • Dev - Compatibility - "Google Listings & Ads" option added.
  • Dev - Developers - alg_wc_ean_product_structured_data_value filter added.
  • Dev - Developers - alg_wc_ean_product_structured_data_markup_value filter added.
  • Dev - Developers - alg_wc_ean_product_structured_data_allow_empty_value filter added.

4.7.4 - 30/08/2023

  • Dev - Pro - Print - Cell - "Cell top/left/right/bottom margin" options added (all default to 0).
  • Dev - Pro - Print - Cell - "Cell content alignment" option added.
  • Dev - Pro - Print - Admin settings descriptions updated.

4.7.3 - 23/08/2023

  • Fix - Declaring HPOS compatibility for the free plugin version, even if the Pro version is activated.
  • Dev - Compatibility - "MultiVendorX" options added.
  • Dev - Admin settings - Advanced - Meta key - Description updated.

4.7.2 - 09/08/2023

  • Fix - Tools - Product Tools - Assign from the list - Product categories - Variations - Checking for the variable product type.
  • Dev - Tools - Product Tools - Assign from the list - Product categories - Variations - Ensuring that products are always sorted by ID (ASC).
  • Tested up to: 6.3.
  • WC tested up to: 8.0.

4.7.1 - 15/07/2023

  • Fix - Search / Admin product search / Admin products list column (sorting) - Handling cases when query['post_type'] is an array.

4.7.0 - 13/07/2023

  • Dev - "EAN-14" type added.
  • Dev - Code refactoring.

4.6.0 - 23/06/2023

  • Dev - Display - Shortcodes are now processed in the "Single product page" and "Shop pages" options.
  • Dev - Display - Shop pages - "Template" option added. Defaults to EAN: %ean%.
  • Dev - Tools - Product Tools - Copy from product attribute - "Custom product attribute" option added.
  • Dev - Shortcodes - [alg_wc_ean_if] shortcode added.
  • Dev - Shortcodes - [alg_wc_ean_if_product_cat] shortcode added.
  • Dev - Shortcodes - [alg_wc_ean_if_product_tag] shortcode added.
  • Dev - Shortcodes - [alg_wc_ean_product_terms] shortcode added.

4.5.1 - 18/06/2023

  • WC tested up to: 7.8.

4.5.0 - 07/06/2023

  • Dev – "High-Performance Order Storage (HPOS)" compatibility.
  • Dev - Admin Settings - Option descriptions updated.
  • Dev - Code refactoring.
  • WC tested up to: 7.7.

4.4.6 - 02/05/2023

  • Dev - Shortcodes - [alg_wc_ean_is_valid] shortcode added.
  • Dev - Shortcodes - [alg_wc_ean_is_unique] shortcode added.
  • Dev - Compatibility - Dokan - "Description" option added.
  • Dev - Compatibility - Dokan - "Required HTML" option added.
  • WC tested up to: 7.6.

4.4.5 - 06/04/2023

  • Fix - Display - Frontend hooks (including barcodes) now are loaded on AJAX as well.
  • Dev - Developers - REST API - alg_wc_ean_rest_api_product_ean_key filter added.
  • Dev - Developers - REST API - alg_wc_ean_rest_api_order_ean_key filter added.
  • Dev - Admin Settings - General - Option descriptions updated.
  • Tested up to: 6.2.
  • WC tested up to: 7.5.

4.4.4 - 02/02/2023

  • Dev - Developers - Admin product search - alg_wc_ean_search_backend filter added.
  • Dev - Developers - Search - alg_wc_ean_search filter added.
  • WC tested up to: 7.3.

4.4.3 - 10/01/2023

  • Dev - Shortcodes - [alg_wc_ean_product_image] - Security - height and width attributes are escaped now.
  • WC tested up to: 7.2.

4.4.2 - 26/11/2022

  • Dev - Tools - Product Tools - "Copy from product attribute" tool added.

4.4.1 - 25/11/2022

  • Dev - Compatibility - Dokan - "Required" option added (defaults to no).
  • WC tested up to: 7.1.
  • Tested up to: 6.1.

4.4.0 - 20/10/2022

  • Dev - General - Admin product edit page - "Require" option added. Defaults to no.
  • Dev - General - Admin product edit page - "Add pattern" option added. Defaults to yes.
  • Dev - Advanced - JavaScript Variation Options - "Variations form" option added. Defaults to .variations_form.
  • WC tested up to: 7.0.

4.3.4 - 28/09/2022

  • Dev - General - Admin product edit page - "Position (variation product)" option added. Defaults to "Variations: After pricing".
  • WC tested up to: 6.9.

4.3.3 - 08/09/2022

  • Fix - Tools - Product Tools - Assign from the list - Product categories - Variations category filtering fixed.

4.3.2 - 29/08/2022

  • Dev - REST API - Products - Add EAN to each product object in REST API responses - EAN added to variation responses as well.

4.3.1 - 15/08/2022

  • Dev - Pro - Print/Barcode Generator - Now checking if classes exist before including the TCPDF library.
  • WC tested up to: 6.8.

4.3.0 - 03/08/2022

  • Dev - REST API - Products - Search by EAN - Now including product variations as well.
  • Dev - Pro - Print - Print Tools - "Products List" tool added.
  • Dev - Pro - Print - Admin Options - Print buttons - Quantity input - "Products > Bulk actions > Each product" option added.
  • Dev - Pro - Extra Fields - Admin settings section description updated.

4.2.0 - 27/07/2022

  • Dev - Compatibility - "Woocommerce OpenPos" compatibility added ("EAN" field is now available in "POS > Setting > Barcode Label > Barcode Meta Key").
  • Dev - Compatibility - WooCommerce PDF Invoices & Packing Slips - "Content" options added. Includes barcodes.
  • Dev - Pro - Code refactoring:
    • Barcode Generator.
    • Shortcodes - [alg_wc_ean_barcode] and [alg_wc_ean_barcode_2d].
  • WC tested up to: 6.7.

4.1.2 - 17/06/2022

  • Dev - Tools - Product Actions - Bulk actions - "Require confirmation?" option added (defaults to "Delete EAN").
  • Fix - Pro - Print - Print Tools - Quantity - Quantity input was ignored when products had identical EANs.
  • Dev - Pro - Print - Admin Options - Print buttons - "Quantity input" option added.

4.1.1 - 16/06/2022

  • Fix - Admin product search - Including all post statuses now (e.g., drafts).
  • Dev - Tools - Product Tools - Copy to product meta - Meta key - Comma-separated list of keys is now accepted.

4.1.0 - 16/06/2022

  • Dev - Tools - Product Tools - "Copy to product meta" tool added.
  • Dev - Shortcodes - [alg_wc_ean_product_sku] - Optional max_length attribute added.
  • Dev - Pro - Print - Print Tools - "Print" tool added.
  • Dev - Pro - Developers - Print - alg_wc_ean_print_get_products filter added.
  • WC tested up to: 6.6.

4.0.0 - 10/06/2022

  • Dev - General - Admin product edit page - 'Add "Generate" button' option added.
  • Dev - Compatibility - WCFM - Variations are supported now.
  • Dev - Compatibility - WCFM - 'Add "Generate" button' option added.
  • Dev - Advanced - Export/Import Plugin Settings - "Reset" tool added.
  • Dev - Advanced - Export/Import Plugin Settings - Code refactoring.
  • Dev - Shortcodes - [alg_wc_ean_product_author_id] shortcode added.
  • Dev - Developers - Tools - Product Tools - Generate:
    • alg_wc_ean_product_tools_generate_ean_country_prefix filter added.
    • alg_wc_ean_product_tools_generate_ean_seed_prefix filter added.
    • alg_wc_ean_product_tools_generate_ean_seed filter added.
  • Dev - Pro - "Extra Fields" sections added.
  • Dev - Pro - Shortcodes - Barcodes - img_w and img_h attributes added (both defaults to false).

See changelog for all versions.