ありがとうございます。
Print Invoice & Delivery Notes for WooCommerceの方から下記のメッセージをいただいたのですが、具体的にどうすればいいのか分かりません、アドバイスお願いできますでしょうか?
______________
Yes, you can include the additional fields in the Invoice. We do have a function that you can use to add your fields using the meta keys for those fields. Please refer to this example function and you can replace the meta keys for your arrival date and time fields in the function to add those fields:
/**
* Add this code snippet in functions.php file of your currently active theme.
* An example that adds a 'VAT' and 'Customer Number' field to the end of the list.
*/
function example_custom_order_fields( $fields, $order ) {
$new_fields = array();
if( get_post_meta( $order->id, 'your_meta_field_name', true ) ) {
$new_fields['your_meta_field_name'] = array(
'label' => 'VAT',
'value' => get_post_meta( $order->id, 'your_meta_field_name', true )
);
}
if( get_post_meta( $order->id, 'your_meta_field_name', true ) ) {
$new_fields['your_meta_field_name'] = array(
'label' => 'Customer Number',
'value' => get_post_meta( $order->id, 'your_meta_field_name', true )
);
}
return array_merge( $fields, $new_fields );
}
add_filter( 'wcdn_order_info_fields', 'example_custom_order_fields', 10, 2 );