Fix address format in plain text email
This commit is contained in:
parent
77f71741b8
commit
a621288459
|
@ -470,15 +470,6 @@ class WC_Admin_Post_Types {
|
|||
echo '<span class="na">–</span>';
|
||||
|
||||
break;
|
||||
case 'billing_address' :
|
||||
if ( $the_order->get_formatted_billing_address() )
|
||||
echo '<a target="_blank" href="' . esc_url( 'http://maps.google.com/maps?&q=' . urlencode( $the_order->get_billing_address() ) . '&z=16' ) . '">' . esc_html( preg_replace( '#<br\s*/?>#i', ', ', $the_order->get_formatted_billing_address() ) ) .'</a>';
|
||||
else
|
||||
echo '–';
|
||||
|
||||
if ( $the_order->payment_method_title )
|
||||
echo '<small class="meta">' . __( 'Via', 'woocommerce' ) . ' ' . esc_html( $the_order->payment_method_title ) . '</small>';
|
||||
break;
|
||||
case 'order_items' :
|
||||
|
||||
printf( '<a href="#" class="show_order_items">' . _n( '%d item', '%d items', sizeof( $the_order->get_items() ), 'woocommerce' ) . '</a>', sizeof( $the_order->get_items() ) );
|
||||
|
|
|
@ -12,12 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
echo "\n" . __( 'Billing address', 'woocommerce' ) . ":\n";
|
||||
echo $order->get_formatted_billing_address() . "\n\n";
|
||||
echo preg_replace( '#<br\s*/?>#i', ', ', $order->get_formatted_billing_address() ) . "\n\n";
|
||||
|
||||
if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) ) {
|
||||
|
||||
echo __( 'Shipping address', 'woocommerce' ) . ":\n";
|
||||
|
||||
echo $shipping . "\n\n";
|
||||
|
||||
echo preg_replace( '#<br\s*/?>#i', ', ', $shipping ) . "\n\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue