2017-07-11 15:08:06 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Email Downloads.
|
|
|
|
*
|
|
|
|
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-downloads.php.
|
|
|
|
*
|
|
|
|
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
|
|
|
* (the theme developer) will need to copy the new files to your theme to
|
|
|
|
* maintain compatibility. We try to do this as little as possible, but it does
|
|
|
|
* happen. When this occurs the version of the template file will be bumped and
|
|
|
|
* the readme will list any important changes.
|
|
|
|
*
|
2018-01-30 12:12:44 +00:00
|
|
|
* @see https://docs.woocommerce.com/document/template-structure/
|
2020-08-05 16:36:24 +00:00
|
|
|
* @package WooCommerce\Templates
|
2018-01-30 12:12:44 +00:00
|
|
|
* @version 3.4.0
|
2017-07-11 15:08:06 +00:00
|
|
|
*/
|
|
|
|
|
2018-01-30 12:12:44 +00:00
|
|
|
defined( 'ABSPATH' ) || exit;
|
2017-07-11 15:08:06 +00:00
|
|
|
|
2019-04-23 15:15:05 +00:00
|
|
|
echo esc_html( wc_strtoupper( esc_html__( 'Downloads', 'woocommerce' ) ) ) . "\n\n";
|
2017-07-11 15:08:06 +00:00
|
|
|
|
|
|
|
foreach ( $downloads as $download ) {
|
|
|
|
foreach ( $columns as $column_id => $column_name ) {
|
2018-01-30 12:12:44 +00:00
|
|
|
echo wp_kses_post( $column_name ) . ': ';
|
2017-07-11 15:08:06 +00:00
|
|
|
|
|
|
|
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
|
2018-01-30 12:12:44 +00:00
|
|
|
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
|
2017-07-11 15:08:06 +00:00
|
|
|
} else {
|
|
|
|
switch ( $column_id ) {
|
2018-01-30 12:12:44 +00:00
|
|
|
case 'download-product':
|
2017-07-11 15:08:06 +00:00
|
|
|
echo esc_html( $download['product_name'] );
|
2018-01-30 12:12:44 +00:00
|
|
|
break;
|
|
|
|
case 'download-file':
|
2017-07-11 15:08:06 +00:00
|
|
|
echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] );
|
2018-01-30 12:12:44 +00:00
|
|
|
break;
|
|
|
|
case 'download-expires':
|
2017-07-11 15:08:06 +00:00
|
|
|
if ( ! empty( $download['access_expires'] ) ) {
|
2018-01-30 12:12:44 +00:00
|
|
|
echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
|
2017-07-11 15:08:06 +00:00
|
|
|
} else {
|
2018-01-30 12:12:44 +00:00
|
|
|
esc_html_e( 'Never', 'woocommerce' );
|
2017-07-11 15:08:06 +00:00
|
|
|
}
|
2018-01-30 12:12:44 +00:00
|
|
|
break;
|
2017-07-11 15:08:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
echo "\n";
|
|
|
|
}
|
|
|
|
echo "\n";
|
|
|
|
}
|
|
|
|
echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=';
|
|
|
|
echo "\n\n";
|