• Hi Ewout,

    First of all thank you for the great plugin!

    I wanted to add both billing and shipping address to my invoices, so I followed your tips in other support threads and I succeeded to include the shipping address in the invoice template, using this:

    <?php $wpo_wcpdf->shipping_address(); ?>

    For me and my customers is also important to add additional field “Shipping Phone”, so If anyone select “Ship to different address” they will have the option to include phone there. I followed this tutorial – Lesson 2 – Adding custom shipping and billing fields and I was able to add that field, but when I include this in the invoice template

    <?php $wpo_wcpdf->shipping_phone(); ?>

    I got the following error

    Fatal error: Call to undefined method WooCommerce_PDF_Invoices::shipping_phone() in /public_html/wp-content/themes/nutri/woocommerce/pdf/Nutri/invoice.php on line 53

    How do I add this Shipping phone to the invoce?

    Thanks!

    https://www.ads-software.com/plugins/woocommerce-pdf-invoices-packing-slips/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Kozzmen,
    First of all, if you’re working with the latest version of the templates, you can add shipping address and billing email & phone via the template settings!

    Second, since the shipping_phone field is not a standard field, I don’t have a shorthand function for it. You can use the custom_field() method.

    Hope that helps!

    Ewout

    Thread Starter Stefan Velev

    (@kozzmen)

    Thanks!

    I will check the link and try to make it work.

    Have a good weekend!

    Stefan

    Plugin Contributor Ewout

    (@pomegranate)

    Allright! Your field name is probably ‘_shipping_phone’.
    Let me know if you have any other questions!

    Ewout

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shipping phone in invoice’ is closed to new replies.