Skip to content

Commit 12bbaed

Browse files
Labels for billing and shipping are removed
Removed this code because many Clients don't want labels for billing and shipping address
1 parent 8f3e876 commit 12bbaed

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

templates/print-order/print-content.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,7 @@
4040
if ( ! $order->get_formatted_billing_address() ) {
4141
esc_attr_e( 'N/A', 'woocommerce-delivery-notes' );
4242
} 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 ) );
5444
}
5545
?>
5646

@@ -65,17 +55,7 @@
6555
if ( ! $order->get_formatted_shipping_address() ) {
6656
esc_attr_e( 'N/A', 'woocommerce-delivery-notes' );
6757
} 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 ) );
7959
}
8060
?>
8161

0 commit comments

Comments
 (0)