plain
3 years ago
admin-cancelled-order.php
5 years ago
admin-failed-order.php
5 years ago
admin-new-order.php
5 years ago
customer-completed-order.php
5 years ago
customer-invoice.php
4 years ago
customer-new-account.php
4 years ago
customer-note.php
5 years ago
customer-on-hold-order.php
3 years ago
customer-processing-order.php
5 years ago
customer-refunded-order.php
5 years ago
customer-reset-password.php
5 years ago
email-addresses.php
4 years ago
email-customer-details.php
5 years ago
email-downloads.php
5 years ago
email-footer.php
3 years ago
email-header.php
3 years ago
email-mobile-messaging.php
3 years ago
email-order-details.php
5 years ago
email-order-items.php
5 years ago
email-styles.php
3 years ago
email-downloads.php
69 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email Downloads. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/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 | $text_align = is_rtl() ? 'right' : 'left'; |
| 21 | |
| 22 | ?><h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></h2> |
| 23 | |
| 24 | <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;" border="1"> |
| 25 | <thead> |
| 26 | <tr> |
| 27 | <?php foreach ( $columns as $column_id => $column_name ) : ?> |
| 28 | <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( $column_name ); ?></th> |
| 29 | <?php endforeach; ?> |
| 30 | </tr> |
| 31 | </thead> |
| 32 | |
| 33 | <?php foreach ( $downloads as $download ) : ?> |
| 34 | <tr> |
| 35 | <?php foreach ( $columns as $column_id => $column_name ) : ?> |
| 36 | <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"> |
| 37 | <?php |
| 38 | if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) { |
| 39 | do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text ); |
| 40 | } else { |
| 41 | switch ( $column_id ) { |
| 42 | case 'download-product': |
| 43 | ?> |
| 44 | <a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a> |
| 45 | <?php |
| 46 | break; |
| 47 | case 'download-file': |
| 48 | ?> |
| 49 | <a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a> |
| 50 | <?php |
| 51 | break; |
| 52 | case 'download-expires': |
| 53 | if ( ! empty( $download['access_expires'] ) ) { |
| 54 | ?> |
| 55 | <time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time> |
| 56 | <?php |
| 57 | } else { |
| 58 | esc_html_e( 'Never', 'woocommerce' ); |
| 59 | } |
| 60 | break; |
| 61 | } |
| 62 | } |
| 63 | ?> |
| 64 | </td> |
| 65 | <?php endforeach; ?> |
| 66 | </tr> |
| 67 | <?php endforeach; ?> |
| 68 | </table> |
| 69 |