Нема описа

order-details-customer.php 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Order Customer Details
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/order/order-details-customer.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
  15. * @version 5.6.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. $show_shipping = ! wc_ship_to_billing_address_only() && $order->needs_shipping_address();
  19. ?>
  20. <section class="woocommerce-customer-details">
  21. <?php if ( $show_shipping ) : ?>
  22. <section class="woocommerce-columns woocommerce-columns--2 woocommerce-columns--addresses col2-set addresses">
  23. <div class="woocommerce-column woocommerce-column--1 woocommerce-column--billing-address col-1">
  24. <?php endif; ?>
  25. <h2 class="woocommerce-column__title"><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
  26. <address>
  27. <?php echo wp_kses_post( $order->get_formatted_billing_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
  28. <?php if ( $order->get_billing_phone() ) : ?>
  29. <p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_billing_phone() ); ?></p>
  30. <?php endif; ?>
  31. <?php if ( $order->get_billing_email() ) : ?>
  32. <p class="woocommerce-customer-details--email"><?php echo esc_html( $order->get_billing_email() ); ?></p>
  33. <?php endif; ?>
  34. </address>
  35. <?php if ( $show_shipping ) : ?>
  36. </div><!-- /.col-1 -->
  37. <div class="woocommerce-column woocommerce-column--2 woocommerce-column--shipping-address col-2">
  38. <h2 class="woocommerce-column__title"><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
  39. <address>
  40. <?php echo wp_kses_post( $order->get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
  41. <?php if ( $order->get_shipping_phone() ) : ?>
  42. <p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_shipping_phone() ); ?></p>
  43. <?php endif; ?>
  44. </address>
  45. </div><!-- /.col-2 -->
  46. </section><!-- /.col2-set -->
  47. <?php endif; ?>
  48. <?php do_action( 'woocommerce_order_details_after_customer_details', $order ); ?>
  49. </section>