|
40 | 40 | if ( ! $order->get_formatted_billing_address() ) { |
41 | 41 | esc_attr_e( 'N/A', 'woocommerce-delivery-notes' ); |
42 | 42 | } else { |
43 | | - $country = $order->get_billing_country(); |
44 | | - $state = $order->get_billing_state(); |
45 | | - $full_name_state = WC()->countries->get_states( $country )[$state]; |
46 | | - $billing_address = 'Company : ' . $order->get_billing_company() . '<br>' . |
47 | | - 'Name : ' . $order->get_formatted_billing_full_name() . '<br>' . |
48 | | - 'Address 1: ' . $order->get_billing_address_1() .',<br>' . |
49 | | - 'Address 2: ' . $order->get_billing_address_2() . ',<br>' . |
50 | | - 'City: ' . $order->get_billing_city() . ' ' . $order->get_billing_postcode() .',<br>' . |
51 | | - 'State: ' . $full_name_state . '.'; |
52 | | - |
53 | | - echo wp_kses_post( apply_filters( 'wcdn_address_billing', $billing_address , $order ) ); |
| 43 | + echo wp_kses_post( apply_filters( 'wcdn_address_billing', $order->get_formatted_billing_address(), $order ) ); |
54 | 44 | } |
55 | 45 | ?> |
56 | 46 |
|
|
65 | 55 | if ( ! $order->get_formatted_shipping_address() ) { |
66 | 56 | esc_attr_e( 'N/A', 'woocommerce-delivery-notes' ); |
67 | 57 | } else { |
68 | | - $country = $order->get_shipping_country(); |
69 | | - $state = $order->get_shipping_state(); |
70 | | - $full_name_state = WC()->countries->get_states( $country )[$state]; |
71 | | - $shipping_address = 'Company : ' . $order->get_shipping_company() . '<br>' . |
72 | | - 'Name : ' . $order->get_formatted_shipping_full_name() . '<br>' . |
73 | | - 'Address 1: ' . $order->get_shipping_address_1() .',<br>' . |
74 | | - 'Address 2: ' . $order->get_shipping_address_2() . ',<br>' . |
75 | | - 'City: ' . $order->get_shipping_city() . ' ' . $order->get_shipping_postcode() .',<br>' . |
76 | | - 'State: ' . $full_name_state . '.' ; |
77 | | - |
78 | | - echo wp_kses_post( apply_filters( 'wcdn_address_shipping', $shipping_address , $order ) ); |
| 58 | + echo wp_kses_post( apply_filters( 'wcdn_address_shipping', $order->get_formatted_shipping_address(), $order ) ); |
79 | 59 | } |
80 | 60 | ?> |
81 | 61 |
|
|
0 commit comments