Add customer notes to invoice
-
Hi, how could I add customer notes to the invoice using the code you provide? I tried changing the code you provide to add an extra field on the invoice, the field “your_meta_field_name” to “customer_note”, but this field does not appear on the invoice. Thank you
function example_custom_order_fields( $fields, $order ) {
$new_fields = array();if( get_post_meta( $order->id, ‘customer_note’, true ) ) {
$new_fields[‘customer_note’] = array(
‘label’ => ‘VAT’,
‘value’ => get_post_meta( $order->id, ‘customer_note’, true )
);
}return array_merge( $fields, $new_fields );
}
add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );
- The topic ‘Add customer notes to invoice’ is closed to new replies.