sofiati
Forum Replies Created
-
I followed the steps above:
1) Screenshot I created the woocommerce-delivery-notes folder and inserted the receipt.php file.

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?

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.

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
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(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