WordPress.org

Support

Support » Plugins and Hacks » WooCommerce PDF Invoices & Packing Slips » Does this work with WooCommerce 1.6?

Does this work with WooCommerce 1.6?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ewout

    @pomegranate

    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

    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

    Plugin Author Ewout

    @pomegranate

    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!

    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?

    Plugin Author Ewout

    @pomegranate

    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); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Does this work with WooCommerce 1.6?’ is closed to new replies.
Skip to toolbar