WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Print Invoice & Delivery Note
print custom field to invoice (1 post)

  1. henry74
    Member
    Posted 3 weeks ago #

    Hi!

    I have used this code in functions.php to add a custom field in the billing address:

    add_action('woocommerce_after_checkout_billing_form', 'my_custom_checkout_field');
    
    <em>function my_custom_checkout_field( $checkout ) {
    
    echo '<div id="my_custom_checkout_field"><h3>'.__('NIF/CIF').'</h3>';
    
    woocommerce_form_field( 'NIF', array(
    'type' => 'text',
    'class' => array('my-field-class form-row-wide'),
    'label' => __('NIF/CIF'),
    'placeholder' => __('Introduzca su NIF/CIF'),
    'required'  => true,
    ), $checkout->get_value( 'NIF' ));
    
    echo '</div>';
    }

    I need to know how to print this code in the invoice. I have tried with a couple of post I found but nothing worked for me.

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

Reply

You must log in to post.

About this Plugin

About this Topic