• Resolved hossamtps

    (@hossamtps)


    Dears,
    thanks for this plugin
    i tried to add data from woocommerce form but it failed
    for example: add first name
    i used this code in function.php

    function example_custom_order_fields( $fields, $order ) {
    $new_fields = array();

    if( get_post_meta( $order->id, ‘billing_first_name’, true ) ) {
    $new_fields[‘billing_first_name’] = array(
    ‘label’ => ‘First name’,
    ‘value’ => get_post_meta( $order->id, ‘billing_first_name’, true )
    );
    }
    return array_merge( $fields, $new_fields );
    }
    add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );


    can you solve this problem ?

Viewing 1 replies (of 1 total)
  • Plugin Author Vishal Kothari

    (@ashokrane)

    Hi @hossamtps,

    When you added the above code, does it show a blank value for ‘First name’ or does it simply not show the ‘First name’ field at all on the invoice?

Viewing 1 replies (of 1 total)

The topic ‘add data from woocommerce form’ is closed to new replies.