• Resolved nevillecampher

    (@nevillecampher)


    Good Day

    I have a question but to sure how to code it. I want to add the two fields to my invoice in the Billing Address Section

    The Id for my clients vat number is id= “billing_vat”

    and the mobile number is id=”billing_mobile”

    I wan to show them in the billing address section in seperate lines,

    Also I have added the Country code but it does not show in a new line but shows in the same line as the postal code. how do I let it start in a new line

    add_filter( 'wcdn_address_billing', 'wcdn_address_billing', 10, 2 );
    function wcdn_address_billing( $address, $order ) {
        $address .= ', ' . WC()->countries->countries[ $order->get_billing_country() ];
        return $address;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • moksha shah

    (@mokshasharmila13)

    Hi @nevillecampher,

    For adding country code in a new line. Please add the below code in your active theme’s functions.php file or using a plugin like Code Snippets:

    add_filter( 'wcdn_address_billing', 'wcdn_address_billing', 10, 2 );
    function wcdn_address_billing( $address, $order ) {
        $address .= '<br> ' . WC()->countries->countries[ $order->get_billing_country() ] . '.';
        return $address;
    }

    Please can you let us know how you added two fields?

    Regards,
    Moksha.

Viewing 1 replies (of 1 total)
  • The topic ‘Want to show client Vat number and client phone number’ is closed to new replies.