Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Upendra Kapse

    (@wpupen)

    Hi @ma7aba-star,

    First of all, apologies for the delay in getting back to you on this.

    We do have a filter using which you can add a custom field to the Invoice using the meta key of that field. Here’s an example code snippet that will help you do this:

    function example_custom_order_fields( $fields, $order ) {
        $new_fields = array();
            
        if( get_post_meta( $order->id, 'your_meta_field_name', true ) ) {
            $new_fields['your_meta_field_name'] = array( 
                'label' => 'VAT',
                'value' => get_post_meta( $order->id, 'your_meta_field_name', true )
            );
        }
        
     
        return array_merge( $fields, $new_fields );
    }
    add_filter( 'wcdn_order_info_fields', 'example_custom_order_fields', 10, 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add custom field to print area’ is closed to new replies.