説明なし

tracking.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. * @package WooCommerce\Templates
  15. * @version 2.2.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. $notes = $order->get_customer_order_notes();
  19. ?>
  20. <p class="order-info">
  21. <?php
  22. echo wp_kses_post(
  23. apply_filters(
  24. 'woocommerce_order_tracking_status',
  25. sprintf(
  26. /* translators: 1: order number 2: order date 3: order status */
  27. __( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
  28. '<mark class="order-number">' . $order->get_order_number() . '</mark>',
  29. '<mark class="order-date">' . wc_format_datetime( $order->get_date_created() ) . '</mark>',
  30. '<mark class="order-status">' . wc_get_order_status_name( $order->get_status() ) . '</mark>'
  31. )
  32. )
  33. );
  34. ?>
  35. </p>
  36. <?php if ( $notes ) : ?>
  37. <h2><?php esc_html_e( 'Order updates', 'woocommerce' ); ?></h2>
  38. <ol class="commentlist notes">
  39. <?php foreach ( $notes as $note ) : ?>
  40. <li class="comment note">
  41. <div class="comment_container">
  42. <div class="comment-text">
  43. <p class="meta"><?php echo date_i18n( esc_html__( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
  44. <div class="description">
  45. <?php echo wpautop( wptexturize( $note->comment_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
  46. </div>
  47. <div class="clear"></div>
  48. </div>
  49. <div class="clear"></div>
  50. </div>
  51. </li>
  52. <?php endforeach; ?>
  53. </ol>
  54. <?php endif; ?>
  55. <?php do_action( 'woocommerce_view_order', $order->get_id() ); ?>