• Resolved andrianiannalisa

    (@andrianiannalisayahooit)


    Hi there,
    I have several custom fields that I want to show on pdf invoice.
    One of my custom field is af_c_f_332964.
    I have added this code

    add_filter('wf_pklist_alter_additional_fields', 'wt_pklist_add_extra_fields', 10, 3);
    function wt_pklist_add_extra_fields($extra_fields, $template_type, $order)
    {
    /* add new field to the list */
    $extra_fields['af_c_f_332964']='Codice Fiscale';
    
    return $extra_fields;
    }

    But it doewsn’t work.
    Where I mistake?
    Regards
    Annalisa

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @andrianiannalisayahooit,

    Greetings from WebToffee.

    We have gone through the code and it seems incomplete. Since you are trying to display the ACF values to the documents, you need to declare the same in the code. You can find the corresponding functions (get_field()) to fetch the ACF data from the ACF documentation itself. Check it in that way to achieve your requirement.

    Thread Starter andrianiannalisa

    (@andrianiannalisayahooit)

    Hi there,
    I don’t know the php code. Could you help me? How do i have to modify the code I wrote for it to work?
    Best regards

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @andrianiannalisayahooit,

    Thanks for getting back in touch and sharing the information. We are sorry for the delayed response. Since you are not familiar with coding, you can have a look at the premium version of our WooCommerce PDF Invoices, packing slips and credit notes plugin which offers an in-built option to add custom fields. Thanks for understanding.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add custom field to pdf invoice’ is closed to new replies.