• Resolved bfeeee

    (@bfeeee)


    Hi,
    I’m using WooCommerce Checkout Manager 4.0.9, WC version 3.0.5 and WP version 4.7.4
    + WooCommerce PDF Invoices & Packing Slips 1.6.5 for invoices.

    I in WC checkout manager added custom fields what I want now to add to PDF Invoice, for that I went to PDF template (templates/pdf/Simple/invoice.php) and add my custom checkout field for example <?php custom_field(‘myfield12’, ‘Company VAT:’); ?> after what I try generate PDF and it doesn’t generate + I don’t get any error.

    Maybe someone can give advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • That should work. Make a simple text change to make sure you are editing the correct file. Also, sometimes those PDF plugins wont generate a NEW pdf each time, so if it was wrong once, you may not see it change once you fix it.

    I also have the same problem.

    I’ve tried multiple code variations but it doesn’t seem to recognize the custom_field.

    Tried adding it to the Template file, tempalte functions file and also the function.php file. I can echo text but the following code does not render any content :<?php $wpo_wcpdf->;custom_field(‘myfield14’); ?>

    .Please advise.

    ____

    I have resolved my issue. My error was due to me using the Abbreviation text as the name of the field in my code. I need to use _billing_myfield14 as my custom field name.

    • This reply was modified 6 years, 11 months ago by stephencottontail.
    • This reply was modified 6 years, 11 months ago by JMedia. Reason: update - resolved

    None of the above worked except this one:

    <?php $wpo_wcpdf->custom_field('_billing_myfield14', 'Label: '); ?>

    or

    <?php $wpo_wcpdf->custom_field('_billing_myfield14'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PDF stops generating adding custom field’ is closed to new replies.