tracking.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Order tracking
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/order/tracking.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
  16. * @version 2.2.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit; // Exit if accessed directly
  20. }
  21. ?>
  22. <p class="order-info"><?php
  23. /* translators: 1: order number 2: order date 3: order status */
  24. echo wp_kses_post( apply_filters( 'woocommerce_order_tracking_status', sprintf(
  25. __( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
  26. '<mark class="order-number">' . $order->get_order_number() . '</mark>',
  27. '<mark class="order-date">' . wc_format_datetime( $order->get_date_created() ) . '</mark>',
  28. '<mark class="order-status">' . wc_get_order_status_name( $order->get_status() ) . '</mark>'
  29. ) ) );
  30. ?></p>
  31. <?php if ( $notes = $order->get_customer_order_notes() ) : ?>
  32. <h2><?php _e( 'Order updates', 'woocommerce' ); ?></h2>
  33. <ol class="commentlist notes">
  34. <?php foreach ( $notes as $note ) : ?>
  35. <li class="comment note">
  36. <div class="comment_container">
  37. <div class="comment-text">
  38. <p class="meta"><?php echo date_i18n( __( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); ?></p>
  39. <div class="description">
  40. <?php echo wpautop( wptexturize( $note->comment_content ) ); ?>
  41. </div>
  42. <div class="clear"></div>
  43. </div>
  44. <div class="clear"></div>
  45. </div>
  46. </li>
  47. <?php endforeach; ?>
  48. </ol>
  49. <?php endif; ?>
  50. <?php do_action( 'woocommerce_view_order', $order->get_id() ); ?>