• Resolved atif9522

    (@atif9522)


    Dear Sir,
    I want to display billing and shipping address fields label in invoice, kindly help me to show them …

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support kenil802

    (@kenil802)

    Hi @atif9522,

    Sorry for the delay in response.

    Regarding the query, can you please add the below code and check whether it works or not.

    Code:

    add_filter( ‘wcdn_address_billing’, ‘change_address_billing’, 10, 2 );
    function change_address_billing( $billing_address, $order ) {
    $billing_address = ‘Address 1 ‘.$order->get_billing_address_1(). ‘, ‘.
    ‘Address 2 ‘.$order->get_billing_address_2().’, ‘. ‘City ‘. $order->get_billing_city().’, ‘. ‘State ‘.$order->get_billing_state();
    return $billing_address;
    }

    Also, you can change the value of $billing_address as per your needs.

    Regards,
    Kenil Shah

    Thread Starter atif9522

    (@atif9522)

    Dear Sir,
    Thanks for your respond, but it doesn’t work if i paste this code in function.php of theme … thanks …

    The code snippet you are trying to save produced a fatal error on line 56:

    syntax error, unexpected ‘1’ (T_LNUMBER)

    Plugin Support kenil802

    (@kenil802)

    Hi @atif9522,

    The code which has been shared with you is working fine for us. So, can you please check by changing the value of the $billing_address whether it is working or not?

    Please let us know the result.

    Regards,
    Kenil Shah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display labels for Billing and Shipping Address’ is closed to new replies.