email-addresses.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Email Addresses
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @author WooThemes
  15. * @package WooCommerce/Templates/Emails
  16. * @version 3.2.1
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit;
  20. }
  21. $text_align = is_rtl() ? 'right' : 'left';
  22. ?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
  23. <tr>
  24. <td style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
  25. <h2><?php _e( 'Billing address', 'woocommerce' ); ?></h2>
  26. <address class="address">
  27. <?php echo ( $address = $order->get_formatted_billing_address() ) ? $address : __( 'N/A', 'woocommerce' ); ?>
  28. <?php if ( $order->get_billing_phone() ) : ?>
  29. <br/><?php echo esc_html( $order->get_billing_phone() ); ?>
  30. <?php endif; ?>
  31. <?php if ( $order->get_billing_email() ) : ?>
  32. <p><?php echo esc_html( $order->get_billing_email() ); ?></p>
  33. <?php endif; ?>
  34. </address>
  35. </td>
  36. <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && ( $shipping = $order->get_formatted_shipping_address() ) ) : ?>
  37. <td style="text-align:<?php echo $text_align; ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
  38. <h2><?php _e( 'Shipping address', 'woocommerce' ); ?></h2>
  39. <address class="address"><?php echo $shipping; ?></address>
  40. </td>
  41. <?php endif; ?>
  42. </tr>
  43. </table>