Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  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 3.4.4
  16. */
  17.  
  18. defined( 'ABSPATH' ) || exit;
  19.  
  20. $show_shipping = wc_ship_to_billing_address_only() && $order->needs_shipping_address();
  21. ?>
  22. <section class="woocommerce-customer-details">
  23.  
  24. <?php if ( $show_shipping ) : ?>
  25.  
  26. <section class="woocommerce-columns woocommerce-columns--2 woocommerce-columns--addresses col2-set addresses">
  27. <div class="woocommerce-column woocommerce-column--1 woocommerce-column--billing-address col-1">
  28.  
  29. <?php endif; ?>
  30.  
  31. <h2 class="woocommerce-column__title"><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
  32.  
  33. <address>
  34. <?php echo wp_kses_post( $order->get_formatted_billing_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
  35.  
  36. <?php if ( $order->get_billing_phone() ) : ?>
  37. <p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_billing_phone() ); ?></p>
  38. <?php endif; ?>
  39.  
  40. <?php if ( $order->get_billing_email() ) : ?>
  41. <p class="woocommerce-customer-details--email"><?php echo esc_html( $order->get_billing_email() ); ?></p>
  42. <?php endif; ?>
  43. </address>
  44.  
  45. <?php if ( $show_shipping ) : ?>
  46.  
  47. </div><!-- /.col-1 -->
  48.  
  49. <div class="woocommerce-column woocommerce-column--2 woocommerce-column--shipping-address col-2">
  50. <h2 class="woocommerce-column__title"><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
  51. <address>
  52. <?php echo wp_kses_post( $order->get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
  53. </address>
  54. </div><!-- /.col-2 -->
  55.  
  56. </section><!-- /.col2-set -->
  57.  
  58. <?php endif; ?>
  59.  
  60. <?php do_action( 'woocommerce_order_details_after_customer_details', $order ); ?>
  61.  
  62. </section>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement