admin-cancelled-order.php
6 years ago
admin-failed-order.php
6 years ago
admin-new-order.php
6 years ago
customer-completed-order.php
6 years ago
customer-invoice.php
6 years ago
customer-new-account.php
6 years ago
customer-note.php
6 years ago
customer-on-hold-order.php
6 years ago
customer-processing-order.php
6 years ago
customer-refunded-order.php
6 years ago
customer-reset-password.php
6 years ago
email-addresses.php
6 years ago
email-customer-details.php
6 years ago
email-downloads.php
6 years ago
email-order-details.php
6 years ago
email-order-items.php
6 years ago
email-order-details.php
55 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Order details table shown in emails. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-details.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/Emails |
| 15 | * @version 3.7.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); |
| 21 | |
| 22 | /* translators: %1$s: Order ID. %2$s: Order date */ |
| 23 | echo wp_kses_post( wc_strtoupper( sprintf( esc_html__( '[Order #%1$s] (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) ) . "\n"; |
| 24 | echo "\n" . wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 25 | $order, |
| 26 | array( |
| 27 | 'show_sku' => $sent_to_admin, |
| 28 | 'show_image' => false, |
| 29 | 'image_size' => array( 32, 32 ), |
| 30 | 'plain_text' => true, |
| 31 | 'sent_to_admin' => $sent_to_admin, |
| 32 | ) |
| 33 | ); |
| 34 | |
| 35 | echo "==========\n\n"; |
| 36 | |
| 37 | $item_totals = $order->get_order_item_totals(); |
| 38 | |
| 39 | if ( $item_totals ) { |
| 40 | foreach ( $item_totals as $total ) { |
| 41 | echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n"; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | if ( $order->get_customer_note() ) { |
| 46 | echo esc_html__( 'Note:', 'woocommerce' ) . "\t " . wp_kses_post( wptexturize( $order->get_customer_note() ) ) . "\n"; |
| 47 | } |
| 48 | |
| 49 | if ( $sent_to_admin ) { |
| 50 | /* translators: %s: Order link. */ |
| 51 | echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n"; |
| 52 | } |
| 53 | |
| 54 | do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); |
| 55 |