Нет описания

email-addresses.php 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. * @package WooCommerce\Templates\Emails
  15. * @version 5.6.0
  16. */
  17. if ( ! defined( 'ABSPATH' ) ) {
  18. exit;
  19. }
  20. $text_align = is_rtl() ? 'right' : 'left';
  21. $address = $order->get_formatted_billing_address();
  22. $shipping = $order->get_formatted_shipping_address();
  23. ?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
  24. <tr>
  25. <td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
  26. <h2><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
  27. <address class="address">
  28. <?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'woocommerce' ) ); ?>
  29. <?php if ( $order->get_billing_phone() ) : ?>
  30. <br/><?php echo wc_make_phone_clickable( $order->get_billing_phone() ); ?>
  31. <?php endif; ?>
  32. <?php if ( $order->get_billing_email() ) : ?>
  33. <br/><?php echo esc_html( $order->get_billing_email() ); ?>
  34. <?php endif; ?>
  35. </address>
  36. </td>
  37. <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
  38. <td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
  39. <h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
  40. <address class="address">
  41. <?php echo wp_kses_post( $shipping ); ?>
  42. <?php if ( $order->get_shipping_phone() ) : ?>
  43. <br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
  44. <?php endif; ?>
  45. </address>
  46. </td>
  47. <?php endif; ?>
  48. </tr>
  49. </table>