Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Email Addresses
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates/Emails
* @version 3.5.4
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$address = $order->get_formatted_billing_address();
$shipping = $order->get_formatted_shipping_address();
?>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="font-size: 0;" valign="top">
<!--[if (gte mso 9)|(IE)]><table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"><![endif]-->
<?php if (!wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping) : ?>
<!--[if (gte mso 9)|(IE)]><tr><td width="280" valign="top"><![endif]-->
<div class="pc-sm-mw-100pc" style="display: inline-block; max-width: 280px; width: 100%; vertical-align: top;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="padding: 10px 20px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="pc-fb-font" style="border-bottom: 1px solid #E5E5E5; padding-bottom: 10px; letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; color: #151515;" valign="top">
<?php esc_html_e('Shipping address', 'woocommerce'); ?>
</td>
</tr>
<tr>
<td height="10" style="line-height: 1px; font-size: 1px;">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="pc-fb-font" style="letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; color: #151515; padding: 10px 0 0;" valign="top">
<?php echo wp_kses_post($shipping); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if (gte mso 9)|(IE)]></td><td width="280" valign="top"><![endif]-->
<?php else: ?>
<!--[if (gte mso 9)|(IE)]><tr><td width="100%" valign="top"><![endif]-->
<?php endif; ?>
<div class="pc-sm-mw-100pc" style="display: inline-block; max-width: 280px; width: 100%; vertical-align: top;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="padding: 10px 20px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="pc-fb-font" style="border-bottom: 1px solid #E5E5E5; padding-bottom: 10px; letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; color: #151515;" valign="top">
<?php esc_html_e('Billing address', 'woocommerce'); ?>
</td>
</tr>
<tr>
<td height="10" style="line-height: 1px; font-size: 1px;">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="pc-fb-font" style="letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; color: #151515; padding: 10px 0 0;" valign="top">
<?php echo wp_kses_post($address ? $address : esc_html__('N/A', 'woocommerce') ); ?>
<?php if ($order->get_billing_phone()) : ?>
<br/><?php echo wc_make_phone_clickable($order->get_billing_phone()); ?>
<?php endif; ?>
<?php if ($order->get_billing_email()) : ?>
<br/><?php echo esc_html($order->get_billing_email()); ?>
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.