Title: Print additional fields?
Last modified: January 20, 2020

---

# Print additional fields?

 *  Resolved [gamethrall](https://wordpress.org/support/users/gamethrall/)
 * (@gamethrall)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/print-additional-fields-2/)
 * Hi, I love the plugin.
 * I’ve been customizing the CSS and that’s been working out very well. We use a
   plugin that allows us to accept purchase orders. The PO number shows up in the
   email from WooCommerce, it’s displayed on the order screen in the admin dashboard.
   I tried adding it to the Invoice, but so far, to no avail.
 * I saw your post about extra fields ([https://wordpress.org/support/topic/extra-fields-14/](https://wordpress.org/support/topic/extra-fields-14/)).
   I’m not a programmer, so I can’t find how to get the field name for the purchase
   order number.
 * If I understand what’s in the print-content.php (and I may not, as I’m not a 
   programmer) file, it’s supposed to print out each item in the order info array.
   Is that correct? If it is, and I understand what print-content does, does that
   mean that the field isn’t part of the order information?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [kenil802](https://wordpress.org/support/users/kenil802/)
 * (@kenil802)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12361033)
 * Hi [@gamethrall](https://wordpress.org/support/users/gamethrall/),
 * Thank you for appreciating our plugin.
 * Regarding the query, can you please inform us which plugin are you using for 
   purchasing the orders? Also, it would be great if you can ask the plugin authors
   about how we can fetch PO numbers from the order information.
 * This information will be helpful to assist you in a better way.
 * Regards,
    Kenil Shah
 *  Thread Starter [gamethrall](https://wordpress.org/support/users/gamethrall/)
 * (@gamethrall)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12362374)
 * The plugin I am using is called Purchase Orders for WooCommerce ([https://wordpress.org/plugins/purchase-orders-for-woocommerce/](https://wordpress.org/plugins/purchase-orders-for-woocommerce/)).
   I reached out to them a few days ago regarding the field information. When they
   respond, I’ll let you know. Thanks!
 * James Bumgarner
 *  [kenil802](https://wordpress.org/support/users/kenil802/)
 * (@kenil802)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12363772)
 * Hi [@gamethrall](https://wordpress.org/support/users/gamethrall/),
 * Thank you for sharing the plugin name and the link.
 * Please let us know once you hear from them.
 * Regards,
    Kenil Shah
 *  Thread Starter [gamethrall](https://wordpress.org/support/users/gamethrall/)
 * (@gamethrall)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12402579)
 * Hi [@kenil802](https://wordpress.org/support/users/kenil802/)
 * The plugin author says that the field is called “_purchase_order_number” and 
   is part of the regular post meta from the order.
 * From a search I did, I found this code which I thought was supposed to display
   the purchase order number, but it is not.
 *     ```
       function add_purchase_order_to_invoice_slip( $fields, $order ) {
           $new_fields = array();
   
           if( get_post_meta( $order->id, '_purchase_order_number', true ) ) {
               $new_fields['_purchase_order_number'] = array( 
                   'label' => 'Purchase Order Number',
                   'value' => get_post_meta( $order->id, '_purchase_order_number', true )
               );
           }
           return array_merge( $fields, $new_fields );
       }
   
       add_filter( 'wcdn_order_info_fields', ' add_purchase_order_to_invoice_slip', 10, 2 );
       ```
   
 *  [kenil802](https://wordpress.org/support/users/kenil802/)
 * (@kenil802)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12425582)
 * Hi [@gamethrall](https://wordpress.org/support/users/gamethrall/),
 * Thank you for the details.
 * Can you please try by replicating the $order->id with $order->get_id() and check
   with it is solving the issue or not.
 * Please let us know how it goes.
 * Regards,
    Kenil Shah
 *  Thread Starter [gamethrall](https://wordpress.org/support/users/gamethrall/)
 * (@gamethrall)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12426464)
 * [@kenil802](https://wordpress.org/support/users/kenil802/)
 * That did it! (That and removing an extraneous space from add_filter that was 
   preventing the entire block from loading). Thank you so much!
 * James
 *  [kenil802](https://wordpress.org/support/users/kenil802/)
 * (@kenil802)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12430890)
 * Hi [@gamethrall](https://wordpress.org/support/users/gamethrall/),
 * I am glad that the provided solution worked for you and it is working fine on
   your site.
 * Please let us know if you have further queries.
 * Regards,
    Kenil Shah

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Print additional fields?’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [kenil802](https://wordpress.org/support/users/kenil802/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/print-additional-fields-2/#post-12430890)
 * Status: resolved