wpcodefactory / ean-for-woocommerce

0 stars 0 forks source link

Support validating 'Code 128' format #1

Open robrecord opened 9 months ago

robrecord commented 9 months ago

Please consider supporting Code 128 / 'Custom' format when barcode validation is turned on.

We have a database of mostly EAN-13 barcodes but at least one product has a Code 128 barcode which is being marked as invalid. Thus changes cannot be made to this product when the validation feature is turned on (with the barcode type set to 'Any'), as the product is disallowed from being saved as the barcode is considered invalid.

Perhaps a setting that allows 'Any + Custom' which relaxes the validation rules.

Thank you.

algoritmika commented 9 months ago

Hi, @robrecord,

I'm not sure if I got the issue correctly, but I think you just need to disable the "Add pattern" checkbox (in "WooCommerce > Settings > EAN > General > Admin product edit page"). I.e., you can still keep the "Check if valid" option enabled - it's the "Add pattern" option that prevents the product from being saved.

Please let me know what you think.