PluginProbe
YayMail – WooCommerce Email Customizer / 4.4.5
YayMail – WooCommerce Email Customizer v4.4.5
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
yaymail / templates / shortcodes / billing-address / main.php

main.php in YayMail – WooCommerce Email Customizer 4.4.5, at templates/shortcodes/billing-address/main.php

36 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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