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-downloads.php
51 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email Downloads. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-downloads.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.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | echo esc_html( wc_strtoupper( esc_html__( 'Downloads', 'woocommerce' ) ) ) . "\n\n"; |
| 21 | |
| 22 | foreach ( $downloads as $download ) { |
| 23 | foreach ( $columns as $column_id => $column_name ) { |
| 24 | echo wp_kses_post( $column_name ) . ': '; |
| 25 | |
| 26 | if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) { |
| 27 | do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text ); |
| 28 | } else { |
| 29 | switch ( $column_id ) { |
| 30 | case 'download-product': |
| 31 | echo esc_html( $download['product_name'] ); |
| 32 | break; |
| 33 | case 'download-file': |
| 34 | echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] ); |
| 35 | break; |
| 36 | case 'download-expires': |
| 37 | if ( ! empty( $download['access_expires'] ) ) { |
| 38 | echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); |
| 39 | } else { |
| 40 | esc_html_e( 'Never', 'woocommerce' ); |
| 41 | } |
| 42 | break; |
| 43 | } |
| 44 | } |
| 45 | echo "\n"; |
| 46 | } |
| 47 | echo "\n"; |
| 48 | } |
| 49 | echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='; |
| 50 | echo "\n\n"; |
| 51 |