• Resolved krishs

    (@krishs)


    Dear team,

    I’m using this plugin on one of my sites, i’m using customization hooks for the invoice, but while displaying the billing address what i’m getting is billing name + billing address. I don’t want to display billing name with billing address. below i’m adding code which i’m using for displaying billing address. Please help me resolve my query ASAP.

    $this->billing_address();

    Thanks in advance.

    • This topic was modified 4 years, 9 months ago by krishs.
Viewing 1 replies (of 1 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @krishs

    You could use the default WooCommerce functions using the order object inside a custom PDF template:

    $this->order->get_billing_first_name();
    $this->order->get_billing_last_name();
    $this->order->get_billing_company();
    $this->order->get_billing_address_1();
    $this->order->get_billing_address_2();
    $this->order->get_billing_city();
    $this->order->get_billing_state();
    $this->order->get_billing_postcode();
    $this->order->get_billing_country();
    $this->order->get_billing_email();
    $this->order->get_billing_phone();
    $this->order->get_shipping_first_name();
    $this->order->get_shipping_last_name();
    $this->order->get_shipping_company();
    $this->order->get_shipping_address_1();
    $this->order->get_shipping_address_2();
    $this->order->get_shipping_city();
    $this->order->get_shipping_state();
    $this->order->get_shipping_postcode();
    $this->order->get_shipping_country();

    If you don’t want to mess with code you could format the address using placeholders with Professional extension.

Viewing 1 replies (of 1 total)

The topic ‘format billing address’ is closed to new replies.