Mobile App Refresh Campaign [Banner] 2024

Product Icon

WooCommerce Order Barcodes

by  Woo
Generates a unique barcode for each order on your site — perfect for e-tickets, packing slips, reservations and a variety of other uses.

User-defined Prefix String for QR

It would be great to have built-in ability to prefix a QR code with a user-defined string. This would allow for environments where a barcode scanner is implemented for UPC/EAN scanning regularly, but then can differentiate from the prefix and run another function.

In my case I run a POS through woo to reduce stock of online products when scanned, but also use this to mark Woocommerce Click’n’Collect Orders as ready for pickup.
This helps staff without any computer literacy to stay on one POS screen and just scan things.

I have already hacked this into my version of the plugin using the following code using a fixed string prefix:
modify “class-woocommerce-order-barcodes.php”: ~LINE 260:
INSERT:
$barcode_stringPrefix = “XFSTQR”;
$barcode_string = $barcode_stringPrefix . $barcode_string;

END MOD

This allows a simple way for other integrated Barcode functionality to play nice by:
if(CurrentScan.startsWith(“XFSTQR”) || CurrentScan.startsWith(“xfstqr”)){
//Do QR Order Lookup things here:

Please note in using this I discovered that Woocommerce Order Barcodes plugin would randomly lowercase my prefix when creating the QR code and cause a false negative on my conditional, so using strtolower in php helps here.

Yes, this prefix could break some formats of Barcodes or QR codes, but for internal use in a custom environ this is read accurately. All you need is my above code, and a user options box with the global prefix, perhaps a length limit and a lockout on starting with http:// or https:// to prevent confusion with actual website QR codes.

🙂

Author

Les Kafkoudas

Current Status

Open

Last updated: January 31, 2023

0 comments

Log in to comment on this feature request.