| 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 |
$billing_address = $order_instance->get_formatted_billing_address(); |
| 14 |
|
| 15 |
if ( ! empty( $billing_address ) ) : |
| 16 |
$billing_phone = $order_instance->get_billing_phone(); |
| 17 |
$billing_email = $order_instance->get_billing_email(); |
| 18 |
?> |
| 19 |
<address> |
| 20 |
<?php echo wp_kses_post( $billing_address ); ?> |
| 21 |
<?php if ( ! empty( $billing_phone ) ) : ?> |
| 22 |
<br/> |
| 23 |
<a href='tel:<?php echo esc_attr( $billing_phone ); ?>' style="font-family: inherit"> |
| 24 |
<?php echo esc_html( $billing_phone ); ?> |
| 25 |
</a> |
| 26 |
<?php endif; ?> |
| 27 |
<?php if ( ! empty( $billing_email ) ) : ?> |
| 28 |
<br/> |
| 29 |
<a href='mailto:<?php echo esc_attr( $billing_email ); ?>' style="font-family: inherit"> |
| 30 |
<?php echo esc_html( $billing_email ); ?> |
| 31 |
</a> |
| 32 |
<?php endif; ?> |
| 33 |
</address> |
| 34 |
<?php |
| 35 |
endif; |
| 36 |
|