order-receipt.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Checkout Order Receipt Template
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/checkout/order-receipt.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 3.2.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit;
  20. }
  21. ?>
  22. <ul class="order_details">
  23. <li class="order">
  24. <?php esc_html_e( 'Order number:', 'woocommerce' ); ?>
  25. <strong><?php echo esc_html( $order->get_order_number() ); ?></strong>
  26. </li>
  27. <li class="date">
  28. <?php esc_html_e( 'Date:', 'woocommerce' ); ?>
  29. <strong><?php echo esc_html( wc_format_datetime( $order->get_date_created() ) ); ?></strong>
  30. </li>
  31. <li class="total">
  32. <?php esc_html_e( 'Total:', 'woocommerce' ); ?>
  33. <strong><?php echo wp_kses_post( $order->get_formatted_order_total() ); ?></strong>
  34. </li>
  35. <?php if ( $order->get_payment_method_title() ) : ?>
  36. <li class="method">
  37. <?php esc_html_e( 'Payment method:', 'woocommerce' ); ?>
  38. <strong><?php echo wp_kses_post( $order->get_payment_method_title() ); ?></strong>
  39. </li>
  40. <?php endif; ?>
  41. </ul>
  42. <?php do_action( 'woocommerce_receipt_' . $order->get_payment_method(), $order->get_id() ); ?>
  43. <div class="clear"></div>