| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
use YayMail\Utils\Helpers; |
| 7 |
|
| 8 |
if ( ! isset( $args['order'] ) || ! ( Helpers::is_woocommerce_order( $args['order'] ) ) ) { |
| 9 |
return; |
| 10 |
} |
| 11 |
|
| 12 |
$order_instance = $args['order']; |
| 13 |
$shipping_address = apply_filters( 'yaymail_shipping_address_content', $order_instance->get_formatted_shipping_address(), $order_instance ); |
| 14 |
if ( ! wc_ship_to_billing_address_only() && $order_instance->needs_shipping_address() && ! empty( $shipping_address ) ) : |
| 15 |
$shipping_phone = $order_instance->get_shipping_phone(); |
| 16 |
?> |
| 17 |
<address> |
| 18 |
<?php echo wp_kses_post( $shipping_address ); ?> |
| 19 |
<?php if ( ! empty( $shipping_phone ) ) : ?> |
| 20 |
<br/> |
| 21 |
<a href='tel:<?php echo esc_attr( $shipping_phone ); ?>' style="font-family: inherit"> |
| 22 |
<?php echo esc_html( $shipping_phone ); ?> |
| 23 |
</a> |
| 24 |
<?php endif; ?> |
| 25 |
</address> |
| 26 |
<?php |
| 27 |
endif; |
| 28 |
|