Custom filed ‘agreenment_choice’ by action hook in invoice template
-
Hi,
I need to put custom field which is choosed by customer in the checkout to the invoice under the billing address. Custom field name is ‘billing_agreenment”. I’ve read documentation about putting action hook to template and it’s working in packing slips when I put ‘billing_agreenment’ insted of ‘delivery date’ from sample but nothing is said about putting custom field to invoice. I’ve tried almost everything with changing template_type to ‘invoice’, etc.Here is template that I tried to modify:
add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_delivery_date', 10, 2 ); function wpo_wcpdf_delivery_date ($template_type, $order) { $document = wcpdf_get_document( $template_type, $order ); if ($template_type == 'packing-slip') { ?> <tr class="delivery-date"> <th>Delivery Date:</th> <td><?php $document->custom_field('delivery_date'); ?></td> </tr> <?php } }
What do I have to change to work it on?
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom filed ‘agreenment_choice’ by action hook in invoice template’ is closed to new replies.