• moofitbaby

    (@moofitbaby)


    I would like to add a extra field to the invoice.
    I already inserted this code in the php just beneath the billing adress but it does not work…

    if ( $this->get_option(‘wc_custom_checkout_newfield0_label’);
    get_post_meta($order->id, ‘_newfield0’, true);
    }
    }

    I’m not a code warrior so can anybody help me?

    http://wordpress.org/plugins/woocommerce-delivery-notes/

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

    (@jarahdamiel)

    Hi moofitbaby,

    I was also busy with the same thing and I just added my meta_key.

    Go to /plugins/woocommerce-delivery-notes/templates/print/print-delivery-note.php

    Put the following function on the place where u want to have your value with 1 parameter, your meta_key.

    For example a have put my meta_key below my products on the invoice:

    </tr><?php endforeach; endif; // END products ?>
    							<tr>
    								<td colspan="3">Ik houd rekening met 10% snijverlies: <strong><?php echo wcdn_get_order_custom_field( 'snijverlies' ); ?></strong></td>
    							</tr>

    I hope this will help you, good luck!

    Thread Starter moofitbaby

    (@moofitbaby)

    🙁 not working….
    I need to put the vat-number just below the address; The vat number is add with this plugg in: WooCommerce Custom Checkout Options.

    Copy pasted your code (It’s dutch! I’m native dutch as wel…). Replaced your meta with my field name but noting…..

    help?

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

The topic ‘adding a custom field to the print php’ is closed to new replies.