Custom filed added (NIP)
-
Good morning,
I’m trying to add the NIP to my invoices, but I don’t know how to do it.
https://prnt.sc/2DDnDPihn0EgI read this tutorial:
https://www.ads-software.com/support/topic/custom-filed-added/I used this code, but it still doesn’t work:
add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_nip_number', 10, 2 ); function wpo_wcpdf_nip_number ( $template_type, $order ) { if ( $template_type == 'invoice' && !empty( $order->get_meta('_billing_nip_') ) ) { ?> <tr class="nip-number"> <th><?php _e( 'Numer NIP:', 'woocommerce-pdf-invoices-packing-slips' ); ?></th> <td><?php echo $order->get_meta('_billing_nip_'); ?></td> </tr> <?php } }
Maybe I skipped a step? I am using the WooCommerce Checkout Field Editor plugin from Woocommerce to add the NIP field and it is called “billing_nip” – https://prnt.sc/nry1VYq1_td0
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom filed added (NIP)’ is closed to new replies.