Add Barcode to WooCommerce Print Invoice & Packing List (PIP) Invoices
A question from a customer regarding adding barcodes to the WooCommerce Print Invoice & Packing List invoices.
Is there any shortcode I can use to place the order barcode onto the invoice from Woocommerce PIP.
I’ve searched the PIP documentation and yours and it’s not clear how to add the barcode to an invoice.
Can you shed any light on this?
Thanks
Adding A Barcode to WooCommerce Print Invoice & Packing List (PIP) Invoices
We reached out to our friends at SkyVerge, the developer of the PIP Extension, and they provided the following information:
—————————————————–
Our plugin does still have templates that can be overridden within the theme to customize these templates, so that method will still work. 🙂We’ve also made it easier to customize without overriding templates by adding a bunch of new hooks within the plugin to adjust the document layout.
You can see details here:
https://docs.woocommerce.com/document/woocommerce-print-invoices-packing-lists-developer-reference/
The document template actions sound like what you need, as this would let you choose an action to output your barcode — given they all give you access to the order object, you could use any action to lookup and output the barcode.
You can read more about hooks in WordPress here.
—————————————————–
Based on the above information, if you would like to add an order number barcode to their templates, it does seem possible.
A barcode is just a digital representation of a value, and can be generated using barcode fonts, or via a real-time barcode API.
However, we do not support their plugin, so we would recommend that you contact their support directly and/or have a developer review their developer documentation further.
Do We Need To Use A Specific PickingPal Barcode?
We received the above follow-up question, and we provided the following clarification.
There is no need to create the exact same barcode as our software does, as the barcode is just a digital representation of a value.
There are many different forms of barcode formats (EAN-13 / UPC-A, Code 128, QR, Code 39, etc.) and current barcode scanners will read many of them.
If you provide the PIP documentation to your developer, and ask them to generate a Code 128 barcode using the Order Number as the input, they will be able to code that fairly easily.
How Does PickingPal Generate Barcodes?
We output this HTML and load the font
<font face=”IDAutomationHC39M”>(<?php echo $order_number; ?>)</font>
Detailed how to https://www.idautomation.com/barcode-fonts/woff-web-fonts/