PluginProbe
YayMail – WooCommerce Email Customizer / 3.3.7
YayMail – WooCommerce Email Customizer v3.3.7
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-before.php

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

111 lines 3.9 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\Helper\Helper;
5
6 $text_align = is_rtl() ? 'right' : 'left';
7 // instructions payment
8 $paymentGateways = wc_get_payment_gateway_by_order( $order );
9 $yaymail_settings = get_option( 'yaymail_settings' );
10 $colorContentTableItems = isset( $yaymail_settings['content_items_color'] ) && ! empty( $yaymail_settings['content_items_color'] ) ? $yaymail_settings['content_items_color'] : '#636363';
11 $colorTitleTableItems = isset( $yaymail_settings['title_items_color'] ) && ! empty( $yaymail_settings['title_items_color'] ) ? $yaymail_settings['title_items_color'] : '#7f54b3';
12 $cash_on_delivery = esc_html__( 'Cash on delivery', 'woocommerce' );
13 if ( ( 'customer_on_hold_order' === $this->template
14 || 'customer_processing_order' === $this->template
15 || 'customer_completed_order' === $this->template
16 || 'customer_refunded_order' === $this->template
17 || 'customer_invoice' === $this->template
18 || 'customer_note' === $this->template )
19 && 2 == $yaymail_settings['payment']
20 || ( Helper::checkKeyExist( $paymentGateways, 'method_title', false ) == $cash_on_delivery
21 && 'cancelled_order' != $this->template
22 && 'new_order' != $this->template
23 && 'failed_order' != $this->template
24 && 'customer_new_account' != $this->template
25 && 'customer_reset_password' != $this->template )
26 ) {?>
27
28 <p style="color: <?php echo esc_attr( $colorContentTableItems ); ?>;text-align: <?php echo esc_attr( $text_align ); ?>" class="yaymail_builder_instructions">
29 <?php echo wp_kses_post( isset( $paymentGateways->instructions ) ? $paymentGateways->instructions : '', 'woocommerce' ); ?>
30 </p>
31
32 <?php } elseif ( 1 == $yaymail_settings['payment'] ) { ?>
33
34 <p class="yaymail_builder_instructions" style="color: <?php echo esc_attr( $colorContentTableItems ); ?>">
35 <?php echo wp_kses_post( isset( $paymentGateways->instructions ) ? $paymentGateways->instructions : '', 'woocommerce' ); ?>
36 </p>
37
38 <?php
39 }
40
41 /*
42 Our bank details
43 payment: Direct bank transfer
44 */
45 if ( false != $paymentGateways && isset( $paymentGateways->account_details ) ) {
46 $account_details = $paymentGateways->account_details;
47 $texts = array(
48 'bank_name' => 'Bank',
49 'account_number' => 'Account number',
50 'sort_code' => 'Sort code',
51 'iban' => 'IBAN',
52 'bic' => 'BIC',
53 );
54 $direct_bank_transfer = esc_html__( 'Direct bank transfer', 'woocommerce' );
55 if ( ( 'customer_on_hold_order' === $this->template
56 || 'customer_processing_order' === $this->template
57 || 'customer_completed_order' === $this->template
58 || 'customer_refunded_order' === $this->template
59 || 'customer_invoice' === $this->template
60 || 'customer_note' === $this->template )
61 && $direct_bank_transfer == $paymentGateways->method_title
62 && is_array( $account_details )
63 && count( $account_details ) > 0
64 && 1 == $yaymail_settings['payment']
65 ) {
66 ?>
67
68 <section style="text-align: ' . $text_align . '" class="yaymail_builder_wrap_account">
69 <h2 style="color: inherit;" class="yaymail_builder_bank_details">
70 <?php esc_html_e( 'Our bank details', 'woocommerce' ); ?>
71 </h2>
72
73 <?php
74 foreach ( $account_details as $accounts ) {
75 foreach ( $accounts as $label_name => $infor_account ) {
76 if ( 'account_name' === $label_name && ! empty( $infor_account ) ) {
77 ?>
78 <h3 style="color: color: inherit;" class="yaymail_builder_account_name">
79 <?php
80 esc_html_e( $infor_account, 'woocommerce' );
81 ?>
82 </h3>
83 <?php
84 }
85 }
86 ?>
87
88 <ul style="color: <?php echo esc_attr( $colorContentTableItems ); ?>">
89 <?php
90 foreach ( $accounts as $label_name => $infor_account ) {
91 if ( 'account_name' !== $label_name && ! empty( $infor_account ) ) {
92 ?>
93
94 <li><?php esc_html_e( $texts[ $label_name ], 'woocommerce' ); ?>:
95 <strong><?php esc_html_e( $infor_account, 'woocommerce' ); ?></strong>
96 </li>
97
98 <?php
99 }
100 }
101 ?>
102 </ul>
103
104 <?php } ?>
105
106 </section>
107 <?php
108 }
109 }
110 ?>
111