Add Custom Field to Invoice
-
Hi guys
Thanks so much for the awesome Plugin.
I would like to add a custom field to the invoice.
I am using Custom Fields Plugin which works great: https://codecanyon.net/item/woocommerce-custom-fields/11332742I am using the following code in my functions.php file:
add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_purchase_order', 10, 2 ); function wpo_wcpdf_purchase_order ($template_type, $order) { if ($template_type == 'invoice') { ?> <tr class="purchase-order"> <th>Purchase Order Number:</th> <td><?php wccf_print_checkout_field_value(array('key' => 'purchase_order_number')); ?></td> </tr> <?php } }
However the value does not show in the invoice.
According to their documentation, I am using the right code to display the value:
https://support.rightpress.net/hc/en-us/articles/115000163123-How-to-display-field-or-field-value-on-custom-pages-Can you kindly help?
Thank you very much.
Cheers
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add Custom Field to Invoice’ is closed to new replies.