Add shipping phone to user facing emails
This commit is contained in:
parent
e168702bb3
commit
d19c31dee3
|
@ -42,7 +42,12 @@ $shipping = $order->get_formatted_shipping_address();
|
|||
<td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
|
||||
<h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
|
||||
|
||||
<address class="address"><?php echo wp_kses_post( $shipping ); ?></address>
|
||||
<address class="address">
|
||||
<?php echo wp_kses_post( $shipping ); ?>
|
||||
<?php if ( $order->get_shipping_phone() ) : ?>
|
||||
<br/><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
|
||||
<?php endif; ?>
|
||||
</address>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
|
|
|
@ -34,5 +34,9 @@ if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) {
|
|||
if ( $shipping ) {
|
||||
echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n";
|
||||
echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n"; // WPCS: XSS ok.
|
||||
|
||||
if ( $order->get_shipping_phone() ) {
|
||||
echo $order->get_shipping_phone() . "\n"; // WPCS: XSS ok.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,10 @@ $show_shipping = ! wc_ship_to_billing_address_only() && $order->needs_shipping_a
|
|||
<h2 class="woocommerce-column__title"><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
|
||||
<address>
|
||||
<?php echo wp_kses_post( $order->get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
|
||||
|
||||
<?php if ( $order->get_shipping_phone() ) : ?>
|
||||
<p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_shipping_phone() ); ?></p>
|
||||
<?php endif; ?>
|
||||
</address>
|
||||
</div><!-- /.col-2 -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue