• Resolved astral4ik

    (@astral4ik)


    HEllo.
    Is anybody can help me please?

    How can i add to the cistomer address labels.
    It should be look like

    First Name: xxxxxx
    Last Name: xxxxxx
    Company Name: xxxxxx
    Country / Region: xxxxxx
    Street address : xxxxxx
    Town / City : xxxxxx
    Postcode / ZIP : xxxxxx

    etc

    Let me explain why i need it. Some our customers from Asian region, and it so difficult to understand where is the street name, province or even the name.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hi @astral4ik

    You can customize the addresses using our Professional extension following this guide: Changing the address format

    Hope that helps!

    Thread Starter astral4ik

    (@astral4ik)

    Ok.. Next question

    custom_field(‘shipping_country’) and custom_field(‘shipping_state’) gives me codes, not full names. For example instead IRELAND it gives me IE and instead DUBLIN it gives D.
    shipping_country_code and shipping_state_code not show anything.
    If i need full names on country and state, what i need to do.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @astral4ik,

    You can try this to get both shipping country and shipping state:

    $countries = WC()->countries;
    $shipping_state = $order->get_shipping_state();
    $shipping_country = $order->get_shipping_country();
    $wc_state_name = $countries->get_states( $shipping_country )[ $shipping_state ];
    $wc_country_name = $countries->countries[ $shipping_country ];
    // Get shipping state name
    $shipping_state_name = ! empty( $wc_state_name ) ? $wc_state_name : $shipping_state;
    // Get shipping country name
    $shipping_country_name = ! empty( $wc_country_name ) ? $wc_country_name : $shipping_country;

    Hope it helps!

    Thread Starter astral4ik

    (@astral4ik)

    Thanks!
    Work like a charm )

    • This reply was modified 3 years, 1 month ago by astral4ik.
    Plugin Contributor Yordan Soares

    (@yordansoares)

    I’m glad to hear that, @astral4ik!

    If you don’t mind and have the time, do you think you could leave us a review?

    Thanks in advance and all the best with your store!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘LABELS for shippind addresses in PACKING SLIP’ is closed to new replies.