Açıklama Yok

email-addresses.php 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Email Addresses (plain)
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/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\Plain
  15. * @version 5.6.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Billing address', 'woocommerce' ) ) ) . "\n\n";
  19. echo preg_replace( '#<br\s*/?>#i', "\n", $order->get_formatted_billing_address() ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  20. if ( $order->get_billing_phone() ) {
  21. echo $order->get_billing_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  22. }
  23. if ( $order->get_billing_email() ) {
  24. echo $order->get_billing_email() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  25. }
  26. if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) {
  27. $shipping = $order->get_formatted_shipping_address();
  28. if ( $shipping ) {
  29. echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n";
  30. echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  31. if ( $order->get_shipping_phone() ) {
  32. echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  33. }
  34. }
  35. }