PluginProbe
YayMail – WooCommerce Email Customizer / 2.1.4
YayMail – WooCommerce Email Customizer v2.1.4
4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 3.4.1 All 57 releases
yaymail / views / templates / emails / email-order-details-border.php

email-order-details-border.php in YayMail – WooCommerce Email Customizer 2.1.4, at views/templates/emails/email-order-details-border.php

201 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4 use YayMail\Page\Source\CustomPostType;
5 $sent_to_admin = ( isset( $sent_to_admin ) ? true : false );
6 $email = ( isset( $email ) ? $email : '' );
7 $plain_text = ( isset( $plain_text ) ? $plain_text : '' );
8 $text_align = is_rtl() ? 'right' : 'left';
9 $postID = CustomPostType::postIDByTemplate( $this->template );
10 $text_link_color = get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) ? get_post_meta( $postID, '_yaymail_email_textLinkColor_settings', true ) : '#96588a';
11 // instructions payment
12 $paymentGateways = wc_get_payment_gateway_by_order( $order );
13 $yaymail_settings = get_option( 'yaymail_settings' );
14 $cash_on_delivery = esc_html__( 'Cash on delivery', 'woocommerce' );
15 if ( ( 'customer_on_hold_order' === $this->template
16 || 'customer_processing_order' === $this->template
17 || 'customer_completed_order' === $this->template
18 || 'customer_refunded_order' === $this->template
19 || 'customer_invoice' === $this->template
20 || 'customer_note' === $this->template )
21 && 2 == $yaymail_settings['payment']
22 || ( isset( $paymentGateways->method_title ) ? $cash_on_delivery == $paymentGateways->method_title : false
23 && 'cancelled_order' != $this->template
24 && 'new_order' != $this->template
25 && 'failed_order' != $this->template
26 && 'customer_new_account' != $this->template
27 && 'customer_reset_password' != $this->template )
28 ) {?>
29
30 <p style="text-align: ' . $text_align . '; margin: 0 0 16px;" class="yaymail_builder_instructions">
31 <?php esc_html_e( isset( $paymentGateways->instructions ) ? $paymentGateways->instructions : '', 'woocommerce' ); ?>
32 </p>
33
34 <?php } elseif ( 1 == $yaymail_settings['payment'] ) { ?>
35
36 <p style="margin: 0 0 16px;" class="yaymail_builder_instructions">
37 <?php esc_html_e( isset( $paymentGateways->instructions ) ? $paymentGateways->instructions : '', 'woocommerce' ); ?>
38 </p>
39
40 <?php
41 }
42
43 /*
44 Our bank details
45 payment: Direct bank transfer
46 */
47 if ( false != $paymentGateways && isset( $paymentGateways->account_details ) ) {
48 $account_details = $paymentGateways->account_details;
49 $texts = array(
50 'bank_name' => 'Bank',
51 'account_number' => 'Account number',
52 'sort_code' => 'Sort code',
53 'iban' => 'IBAN',
54 'bic' => 'BIC',
55 );
56 $direct_bank_transfer = esc_html__( 'Direct bank transfer', 'woocommerce' );
57 if ( ( 'customer_on_hold_order' === $this->template
58 || 'customer_processing_order' === $this->template
59 || 'customer_completed_order' === $this->template
60 || 'customer_refunded_order' === $this->template
61 || 'customer_invoice' === $this->template
62 || 'customer_note' === $this->template )
63 && $direct_bank_transfer == $paymentGateways->method_title
64 && is_array( $account_details )
65 && count( $account_details ) > 0
66 && 1 == $yaymail_settings['payment']
67 ) {
68 ?>
69
70 <section style="text-align: ' . $text_align . '" class="yaymail_builder_wrap_account">
71 <h2 class="yaymail_builder_bank_details" style="color: #96588a;">
72 <?php esc_html_e( 'Our bank details', 'woocommerce' ); ?>
73 </h2>
74
75 <?php
76 foreach ( $account_details as $accounts ) {
77 foreach ( $accounts as $label_name => $infor_account ) {
78 if ( 'account_name' === $label_name && ! empty( $infor_account ) ) {
79 ?>
80 <h3 class="yaymail_builder_account_name" style="color: #96588a;">
81 <?php
82 esc_html_e( $infor_account, 'woocommerce' );
83 ?>
84 </h3>
85 <?php
86 }
87 }
88 ?>
89
90 <ul>
91 <?php
92 foreach ( $accounts as $label_name => $infor_account ) {
93 if ( 'account_name' !== $label_name && ! empty( $infor_account ) ) {
94 ?>
95
96 <li><?php esc_html_e( $texts[ $label_name ], 'woocommerce' ); ?>:
97 <strong><?php esc_html_e( $infor_account, 'woocommerce' ); ?></strong>
98 </li>
99
100 <?php
101 }
102 }
103 ?>
104 </ul>
105
106 <?php } ?>
107
108 </section>
109 <?php
110 }
111 }
112 ?>
113
114 <!-- Title Table Order Items -->
115 <h2 class="yaymail_builder_order" style="color: #96588a;font-size: 18px;font-weight: 700;">
116 <?php
117 if ( $sent_to_admin ) {
118 $before = '<a style="font-weight: normal;color: ' . $text_link_color . '" class="yaymail_builder_link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
119 $after = '</a>';
120 /* translators: %s: Order ID. */
121 echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
122 } else {
123 $before = '';
124 $after = '';
125 /* translators: %s: Order ID. */
126 echo wp_kses_post( $before . sprintf( __( 'Order #%s', 'woocommerce' ), $order->get_order_number() ) );
127 }
128 ?>
129 </h2>
130
131 <!-- Table Items has Border -->
132 <table class="yaymail_builder_table_items_content" cellspacing="0" cellpadding="6" border="1" style="width: 100% !important;color: inherit;flex-direction:column;border: 1px solid;border-color: inherit;" width="100%">
133 <thead>
134 <tr style="word-break: normal">
135 <th class="td" scope="col" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit;">
136 <?php esc_html_e( 'Product', 'woocommerce' ); ?>
137 </th>
138 <th class="td" scope="col" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit;">
139 <?php esc_html_e( 'Quantity', 'woocommerce' ); ?>
140 </th>
141 <th class="td" scope="col" style="text-align:left; width: 30%;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit;">
142 <?php esc_html_e( 'Price', 'woocommerce' ); ?>
143 </th>
144 </tr>
145 </thead>
146
147 <tbody style="flex-direction:inherit;" >
148 <?php
149 echo wp_kses_post(
150 $this->ordetItemTables(
151 $order,
152 array(
153 'show_sku' => $sent_to_admin,
154 'show_image' => false,
155 'image_size' => array( 32, 32 ),
156 'plain_text' => $plain_text,
157 'sent_to_admin' => $sent_to_admin,
158 )
159 )
160 );
161
162 ?>
163 </tbody>
164
165 <tfoot>
166 <?php
167 $totalItem = $order->get_order_item_totals();
168 $i = 0;
169 foreach ( $totalItem as $key => $total ) {
170 $i++;
171 ?>
172
173 <tr>
174 <th class="td" scope="row" colspan="2" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit; <?php echo esc_attr( ( 1 === $i ) ? 'border-top-width: 4px;' : '' ); ?>">
175 <?php echo esc_html( $total['label'] ); ?>
176 </th>
177 <td class="td" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit; <?php echo esc_attr( ( 1 === $i ) ? 'border-top-width: 4px;' : '' ); ?>">
178 <?php echo wp_kses_post( $total['value'] ); ?>
179 </td>
180 </tr>
181
182 <?php
183 }
184
185 if ( ! empty( $order->get_customer_note() ) ) {
186 $note = $order->get_customer_note();
187 ?>
188
189 <tr>
190 <th class="td" scope="row" colspan="2" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit; <?php echo esc_attr( ( 1 === $i ) ? 'border-top-width: 4px;' : '' ); ?>">
191 <?php esc_html_e( 'Note:', 'woocommerce' ); ?>
192 </th>
193 <td class="td" style="text-align:left;vertical-align: middle;padding: 12px;font-size: 14px;border: 1px solid;border-color: inherit; <?php echo esc_attr( ( 1 === $i ) ? 'border-top-width: 4px;' : '' ); ?>">
194 <?php echo esc_html( $note ); ?>
195 </td>
196 </tr>
197
198 <?php } ?>
199 </tfoot>
200 </table>
201