Title: sofiati's Replies | WordPress.org

---

# sofiati

  [  ](https://wordpress.org/support/users/sofiati/)

 *   [Profile](https://wordpress.org/support/users/sofiati/)
 *   [Topics Started](https://wordpress.org/support/users/sofiati/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sofiati/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sofiati/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sofiati/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sofiati/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sofiati/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Print Invoice & Delivery Notes for WooCommerce] the fields in the Order Information section are no longer displayed](https://wordpress.org/support/topic/the-fields-in-the-order-information-section-are-no-longer-displayed/)
 *  Thread Starter [sofiati](https://wordpress.org/support/users/sofiati/)
 * (@sofiati)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/the-fields-in-the-order-information-section-are-no-longer-displayed/#post-18895587)
 * I followed the steps above:
 * 1) Screenshot I created the woocommerce-delivery-notes folder and inserted the
   receipt.php file.
 * ![](https://i0.wp.com/oneparfums.eu/Screenshot.png?ssl=1)
 * I want to modify this template.
 * Now what do I do? What changes do I need to make to the copied file?
 * Can you tell me all the steps I need to take?
 * In version 6.0 you could see these pdf and print-order folders…why are they not
   visible in the version 7.1 template now?
 * ![](https://i0.wp.com/oneparfums.eu/Screenshot1.png?ssl=1)
 * Do I also have to insert them into the theme in the woocommerce-delivery-notes
   folder?
 * what should I do?
 * In version 6.0, the template I used was in pdf/default/invoice/template.php.
 * ![](https://i0.wp.com/oneparfums.eu/Screenshot2.png?ssl=1)
 * What should I do with this file? Should I copy the code into the invoice.php 
   template I copied to the woocommerce-delivery-notes folder in my theme?
 * In my theme’s function.php, I added code for custom fields:
 * Should this file be modified? Or should it not be touched?
 * add_filter(‘wcdn_order_info_fields’, ‘aggiungi_metadati_nota_consegna’, 10, 2);
 * function aggiungi_metadati_nota_consegna( $fields, $order ) {
   $personalizzato
   = get_post_meta( $order->get_id(), ‘_billing_piva’, true );if ( ! empty( $personalizzato)){
   $fields[‘_billing_piva’] = array(‘label’ => ‘Etichetta Campo’,‘value’ => $personalizzato);}
   return $fields;}
 * Where should I put it now? Will it stay the same?
 * Can you tell me all the steps to be able to view the custom fields in the PDF?
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Print Invoice & Delivery Notes for WooCommerce] the fields in the Order Information section are no longer displayed](https://wordpress.org/support/topic/the-fields-in-the-order-information-section-are-no-longer-displayed/)
 *  Thread Starter [sofiati](https://wordpress.org/support/users/sofiati/)
 * (@sofiati)
 * [3 weeks, 3 days ago](https://wordpress.org/support/topic/the-fields-in-the-order-information-section-are-no-longer-displayed/#post-18894517)
 * After upgrading to 7.0 I can’t view metadata in PDF.
 * This is the code I inserted into function.php…
 * function custom_order_info_fields( $fields, $order ) {
   // Add your custom meta
   fields here$custom_fields = array(
 *     ```wp-block-code
           array(        'label' => 'Partita IVA per fattura',        'value' => $order->get_meta('_billing_piva', true),    ),    array(        'label' => 'Codice fiscale per fattura',        'value' => $order->get_meta('_billing_cf', true),    ),);// Merge the custom fields with the existing fields$fields = array_merge( $fields, $custom_fields );return $fields;
       ```
   
 * }
   add_filter( ‘wcdn_order_info_fields’, ‘custom_order_info_fields’, 10, 2 );
 * But now it doesn’t work…what should I change? What should I do?
 * Before it printed VAT number, certified email, courier etc. in the PDF. Do I 
   need to change anything in the function.php file?
 * Thanks

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