Title: Woocommerce Barcode
Last modified: April 27, 2020

---

# Woocommerce Barcode

 *  Resolved [massivegeek](https://wordpress.org/support/users/massivegeek/)
 * (@massivegeek)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-barcode/)
 * Hello I use the “WooCommerce Order Barcodes” plugin and would like to add the
   barcode to the invoice print outs for scanning when packing orders. The barcode
   image is stored in the wp_postmeta table withe meta_key barcode_image the meta_value
   starts with “data:image/bmp;base64” followed by all the data.
 * I have tried to use your example code in the FAQ but I cant seem to get it to
   show on the Invoice prints. A solution to this would be greatly appreciated
    -  This topic was modified 6 years, 3 months ago by [massivegeek](https://wordpress.org/support/users/massivegeek/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [massivegeek](https://wordpress.org/support/users/massivegeek/)
 * (@massivegeek)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-barcode/#post-12739029)
 * I managed to get this working in the end, if anyone else stumbles across this
   the following code worked.
 *     ```
       function invoice_custom_order_fields( $fields, $order ) {
           $new_fields = array();
   
           if( get_post_meta( $order->id, '_barcode_image', true ) ) {
               $new_fields['Barcode'] = array( 
                   'label' => 'Order Barcode',
             'value' => '<img src="/?wc_barcode='.get_post_meta( $order->id, '_barcode_text', true ).'" width="200" height="40" />'
               );
           }
   
           return array_merge( $fields, $new_fields );
       }
       add_filter( 'wcdn_order_info_fields', 'invoice_custom_order_fields', 10, 2 );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Woocommerce Barcode’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [massivegeek](https://wordpress.org/support/users/massivegeek/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/woocommerce-barcode/#post-12739029)
 * Status: resolved