Cannot add new field to template
-
hey guys,
I’ve tried to follow your instructions to add an extra field (if the user did fill it) on the invoice.
add_filter( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_add_NIF', 10, 2 ); function wpo_wcpdf_add_tax_id( $template_type, $order ) { if ( $template_type == 'invoice' ) { echo "<tr><td>This should</td><td>print no matter what</td></tr>"; $nif = $order->get_meta( 'billing_nif' ); if ($nif) { echo "<tr><td>NIF / NIPC:</td><td>{$nif}</td></tr>"; } } }
This is what I have, but nothing comes up. I delete and recreate the PDF but no luck.
Is there something I’m missing?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Cannot add new field to template’ is closed to new replies.