• Hi there!

    How would we add a custom field we use at check out to apply to the PDF invoice. We already add this field to the email invoice with the following code

    add_filter(‘woocommerce_email_order_meta_keys’, ‘my_custom_order_meta_keys’);

    function my_custom_order_meta_keys( $keys ) {
    $keys[] = ‘WBTV-nummer’; // This will look for a custom field called ‘WBTV-nummer’ and add it to emails
    return $keys;
    }

    what hook do we need to add somewhere on the PDF?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    Try below code. When changing the template of the PDF invoice, do not forget to add it as a custom template. See FAQ.

    echo WPI()->get_meta( 'WBTV-nummer' );

Viewing 1 replies (of 1 total)
  • The topic ‘Add Custom fields’ is closed to new replies.