add custom field on invoice and maybe on packing slip
-
Hi.
I was woundering how I can add a custom field that i’v created for the checkout page on the invoice and maybe on the packing slip
the custom field meta is: _billing_cnp
That custom field is just plain text.My custom field is added on the checkout page exactly after the company field.
So… would be nice If I can get something like.
________
Name
Company
My Custom Field
Billing Address
________
I’v tried this, but doesn’t work:add_action( 'wpo_wcpdf_before_billing_address', 'wpo_wcpdf_billing_cnp', 10, 2 ); function wpo_wcpdf_billing_cnp ($document_type, $order) { if ($document_type == 'invoice') { // get the delivery date from the order $billing_cnp = $order->get_meta('billing_cnp'); ?> <tr class="billing-cnp"> <th>CNP:</th> <td><?php echo $billing_cnp; ?></td> </tr> <?php } }
I’v read from the documentation, but I can’t find something to help me achive what I want.
Thank you!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘add custom field on invoice and maybe on packing slip’ is closed to new replies.