| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
use YayMail\Page\Source\CustomPostType; |
| 5 |
use YayMail\Helper\Helper; |
| 6 |
|
| 7 |
$is_preview = Helper::isPreview( $this->preview_mail ); |
| 8 |
$text_align = is_rtl() ? 'right' : 'left'; |
| 9 |
$sent_to_admin = ( isset( $sent_to_admin ) ? $sent_to_admin : false ); |
| 10 |
$plain_text = ( isset( $plain_text ) ? $plain_text : '' ); |
| 11 |
$email = ( isset( $email ) ? $email : '' ); |
| 12 |
$postID = CustomPostType::postIDByTemplate( $this->template ); |
| 13 |
$text_link_color = get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) ? get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) : '#7f54b3'; |
| 14 |
$borderColor = isset( $atts['bordercolor'] ) && $atts['bordercolor'] ? 'border-color:' . html_entity_decode( $atts['bordercolor'], ENT_QUOTES, 'UTF-8' ) : 'border-color:inherit'; |
| 15 |
$textColor = isset( $atts['textcolor'] ) && $atts['textcolor'] ? 'color:' . html_entity_decode( $atts['textcolor'], ENT_QUOTES, 'UTF-8' ) : 'color:inherit'; |
| 16 |
$order_item_download_title = get_post_meta( $postID, '_yaymail_email_order_item_download_title', true ); |
| 17 |
$product_title = $is_preview ? '{{items_download_product_title}}' : ( false != $order_item_download_title ? $order_item_download_title['items_download_product_title'] : 'Product' ); |
| 18 |
$expires_title = $is_preview ? '{{items_download_expires_title}}' : ( false != $order_item_download_title ? $order_item_download_title['items_download_expires_title'] : 'Expires' ); |
| 19 |
$download_title = $is_preview ? '{{items_download_download_title}}' : ( false != $order_item_download_title ? $order_item_download_title['items_download_download_title'] : 'Download' ); |
| 20 |
$columns = apply_filters( |
| 21 |
'woocommerce_email_downloads_columns', |
| 22 |
array( |
| 23 |
'download-product' => __( 'Product', 'woocommerce' ), |
| 24 |
'download-expires' => __( 'Expires', 'woocommerce' ), |
| 25 |
'download-file' => __( 'Download', 'woocommerce' ), |
| 26 |
) |
| 27 |
); |
| 28 |
?> |
| 29 |
|
| 30 |
<!-- Table Items has Border --> |
| 31 |
<table class="yaymail_builder_table_items_border yaymail_builder_table_item_download" cellspacing="0" cellpadding="6" border="1" style="width: 100% !important;<?php echo esc_attr( $borderColor ); ?>;color: inherit;flex-direction:inherit;" width="100%"> |
| 32 |
<thead> |
| 33 |
<tr style="word-break: normal;<?php echo esc_attr( $textColor ); ?>"> |
| 34 |
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;<?php echo esc_attr( $borderColor ); ?>;"> |
| 35 |
<?php esc_html_e( $product_title, 'woocommerce' ); ?> |
| 36 |
</th> |
| 37 |
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;<?php echo esc_attr( $borderColor ); ?>;"> |
| 38 |
<?php esc_html_e( $expires_title, 'woocommerce' ); ?> |
| 39 |
</th> |
| 40 |
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;<?php echo esc_attr( $borderColor ); ?>;"> |
| 41 |
<?php esc_html_e( $download_title, 'woocommerce' ); ?> |
| 42 |
</th> |
| 43 |
</tr> |
| 44 |
</thead> |
| 45 |
<tfoot> |
| 46 |
<tr style="<?php echo esc_attr( $textColor ); ?>"> |
| 47 |
<td class="td" style="<?php echo esc_attr( $borderColor ); ?>;text-align:<?php echo esc_attr( $text_align ); ?>"> |
| 48 |
<a href="" style="color:<?php echo esc_attr( $text_link_color ); ?>" > <?php esc_html_e( 'Downloadable Product', 'yaymail' ); ?></a> |
| 49 |
</td> |
| 50 |
<td class="td" style="<?php echo esc_attr( $borderColor ); ?>;text-align:<?php echo esc_attr( $text_align ); ?>"> |
| 51 |
<time datetime="2021-02-13" title="1613174400"> <?php echo wp_kses_post( wc_format_datetime( new WC_DateTime() ) ); ?></time> |
| 52 |
</td> |
| 53 |
<td class="td" style="<?php echo esc_attr( $borderColor ); ?>;text-align:<?php echo esc_attr( $text_align ); ?>"> |
| 54 |
<a href="" style="color:<?php echo esc_attr( $text_link_color ); ?>" ><?php esc_html_e( 'Download.doc', 'yaymail' ); ?></a> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
</tfoot> |
| 58 |
</table> |
| 59 |
|