WordPress.org

Forums

WooCommerce PDF Invoices & Packing Slips
Does this work with WooCommerce 1.6? (7 posts)

  1. Trevor Gehman
    Member
    Posted 1 year ago #

    I'm still using WooCommerce 1.6.6. Will this plugin work?

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

  2. Ewout
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Trevor,
    I have not tested this with 1.6.6. I have built in some extra functions to make it backwards compatible with older function calls, but only tested thoroughly on 2.0 & 2.1. It might just work, but there's only one way to find out :o)

    Let me know what you find!

    Ewout

  3. v1ncent21
    Member
    Posted 1 year ago #

    Hi Ewout, i've a problem with my pdf invoice.
    I use the plugin woocommerce-pdf-invoices-packing-slips but the field "Partita Iva" (Italian Tax) in pdf invoce after the order do not appear? there is a method to insert this field?
    thank you very much

  4. Ewout
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Vincent,
    You can insert a custom field in the PDF template like this:

    Partita Iva: <?php echo get_post_meta($wpo_wcpdf->export->order->id,''_partita_iva',true); ?>

    Where you replace _partita_iva with your own custom field ID. More about this can be found in this thread: add fields in the simple template from WooCommerce Checkout Manager

    Ewout

    p.s. you're posting in a thread about WooCommerce 1.6 compatibility, it's better to open a new thread for different topics!

  5. v1ncent21
    Member
    Posted 1 year ago #


  6. v1ncent21
    Member
    Posted 1 year ago #

    Hi, thanks Ewout and excuse me for answer most after.
    I resolved this problem...follow me if it's exact.
    I install woocommerce-pdf-invoices-packing-slips and woocommerce-checkout-field-editor, next i go to the woocommerce-pdf-invoices-packing-slips-->templates--->pdf--->simple--->invoice.php
    in the line 61 i paste this script:

    <div class="recipient-address"><?php $wpo_wcpdf->billing_address(); ?></div>
                 P. Iva/C. Fisc. <?php
    $yourfield = get_post_meta($wpo_wcpdf->export->order->id,'billing_vat',true);
    if (isset($yourfield)) {
    	echo $yourfield;
    }
    ?>

    before in woocommerce-checkout-field-editor I insert the field Partita Iva and i setting the class ID billing_vat.
    It works in my pdf invoice.
    you agree with me?

  7. Ewout
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Vincent, that looks good to me. I would make a small adjustment

    If you want to display the label ('P. Iva/C. Fisc.') only when there's a value, do:

    <div class="recipient-address"><?php $wpo_wcpdf->billing_address(); ?></div>
    <?php
    $billing_vat = get_post_meta($wpo_wcpdf->export->order->id,'billing_vat',true);
    if (isset($billing_vat)) {
    	echo 'P. Iva/C. Fisc.' . $billing_vat;
    }
    ?>

    If you want to always display the label (which is how you have it now):

    <div class="recipient-address"><?php $wpo_wcpdf->billing_address(); ?></div>
    P. Iva/C. Fisc. <?php echo get_post_meta($wpo_wcpdf->export->order->id,'billing_vat',true); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce PDF Invoices & Packing Slips
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.