Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hello @maluus,

    – Could you install the WooCommerce Store Toolkit plugin?
    – Afterwards, go to the edit-order screen for the order you’re talking about.
    – Scroll down, till you see the new “Order Post Meta” section.
    order-post-meta
    – In this list, look for the NIP value (you could use CTRL + F) & take note of it.
    – In the code snippet below, replace _custom_field_here with the meta-key you found in the previous step to display the NIP:

    
    add_action( 'wpo_wcpdf_after_billing_address', 'wpo_wcpdf_add_nip', 10, 2 );
    function wpo_wcpdf_add_nip ($document_type, $order) {
    	// if order is empty, bail!
    	if ( empty($order)) {return;};
    
    	echo  'NIP: ' .  $order->get_meta('_custom_field_here')
    }
    Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @maluus,

    Were you able to achieve your goal?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom Field in Invoice’ is closed to new replies.