Passed
Push — master ( f411ba...4d2fb8 )
by Brian
05:15
created
templates/invoice-receipt.php 1 patch
Switch Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that prints the invoice receipt page.
4 4
  *
@@ -7,153 +7,153 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-// Fetch the invoice.
13
-$invoice = new WPInv_Invoice( $invoice );
14
-
15
-// @deprecated
16
-do_action( 'wpinv_success_content_before', $invoice );
17
-do_action( 'wpinv_before_receipt', $invoice );
10
+    defined( 'ABSPATH' ) || exit;
18 11
 
19
-wpinv_print_errors();
12
+    // Fetch the invoice.
13
+    $invoice = new WPInv_Invoice( $invoice );
20 14
 
21
-// Prepare header text.
22
-if ( $invoice->is_paid() ) {
15
+    // @deprecated
16
+    do_action( 'wpinv_success_content_before', $invoice );
17
+    do_action( 'wpinv_before_receipt', $invoice );
23 18
 
24
-    $alert = aui()->alert(
25
-        array(
26
-            'type'    => 'success',
27
-            'content' => __( 'Thank you for your payment!', 'invoicing' ),
28
-        )
29
-    );
30
-
31
-} elseif ( $invoice->is_refunded() ) {
32
-
33
-    $alert = aui()->alert(
34
-        array(
35
-            'type'    => 'info',
36
-            'content' => __( 'This invoice was refunded.', 'invoicing' ),
37
-        )
38
-    );
39
-
40
-} elseif ( $invoice->is_held() ) {
41
-
42
-    $alert = aui()->alert(
43
-        array(
44
-            'type'    => 'info',
45
-            'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ),
46
-        )
47
-    );
48
-
49
-} elseif ( $invoice->needs_payment() ) {
19
+    wpinv_print_errors();
50 20
 
51
-    if ( ! empty( $_GET['token'] ) ) {
21
+    // Prepare header text.
22
+    if ( $invoice->is_paid() ) {
52 23
 
53 24
         $alert = aui()->alert(
54 25
             array(
55
-                'type'    => 'info',
56
-                'content' => __( "Sometimes it takes a few minutes for us to verify your payment. We'll notify you as soon as we've verified the payment.", 'invoicing' ),
26
+                'type'    => 'success',
27
+                'content' => __( 'Thank you for your payment!', 'invoicing' ),
57 28
             )
58 29
         );
59 30
 
60
-    } elseif ( $invoice->is_due() ) {
31
+} elseif ( $invoice->is_refunded() ) {
61 32
 
62 33
         $alert = aui()->alert(
63 34
             array(
64
-                'type'    => 'danger',
65
-                'content' => sprintf(
66
-                    __( 'This invoice was due on %.', 'invoicing' ),
67
-                    getpaid_format_date_value( $invoice->get_due_date() )
68
-                ),
35
+                'type'    => 'info',
36
+                'content' => __( 'This invoice was refunded.', 'invoicing' ),
69 37
             )
70 38
         );
71 39
 
72
-    } else {
40
+} elseif ( $invoice->is_held() ) {
73 41
 
74 42
         $alert = aui()->alert(
75 43
             array(
76
-                'type'    => 'warning',
77
-                'content' => __( 'This invoice needs payment.', 'invoicing' ),
44
+                'type'    => 'info',
45
+                'content' => __( 'This invoice will be processed as soon we verify your payment.', 'invoicing' ),
78 46
             )
79 47
         );
80 48
 
81
-    }
49
+} elseif ( $invoice->needs_payment() ) {
50
+
51
+        if ( ! empty( $_GET['token'] ) ) {
52
+
53
+            $alert = aui()->alert(
54
+                array(
55
+                    'type'    => 'info',
56
+                    'content' => __( "Sometimes it takes a few minutes for us to verify your payment. We'll notify you as soon as we've verified the payment.", 'invoicing' ),
57
+                )
58
+            );
59
+
60
+        } elseif ( $invoice->is_due() ) {
61
+
62
+            $alert = aui()->alert(
63
+                array(
64
+                    'type'    => 'danger',
65
+                    'content' => sprintf(
66
+                        __( 'This invoice was due on %.', 'invoicing' ),
67
+                        getpaid_format_date_value( $invoice->get_due_date() )
68
+                    ),
69
+                )
70
+            );
71
+
72
+        } else {
73
+
74
+            $alert = aui()->alert(
75
+                array(
76
+                    'type'    => 'warning',
77
+                    'content' => __( 'This invoice needs payment.', 'invoicing' ),
78
+                )
79
+            );
80
+
81
+        }
82 82
 }
83 83
 
84
-// Invoice actions.
85
-$invoice_actions = apply_filters(
86
-    'wpinv_invoice_receipt_actions',
87
-    array(
84
+    // Invoice actions.
85
+    $invoice_actions = apply_filters(
86
+        'wpinv_invoice_receipt_actions',
87
+        array(
88
+
89
+            'pay'     => array(
90
+                'url'   => $invoice->get_checkout_payment_url(),
91
+                'name'  => __( 'Pay For Invoice', 'invoicing' ),
92
+                'class' => 'btn-success',
93
+            ),
88 94
 
89
-        'pay'     => array(
90
-            'url'   => $invoice->get_checkout_payment_url(),
91
-            'name'  => __( 'Pay For Invoice', 'invoicing' ),
92
-            'class' => 'btn-success',
93
-        ),
95
+            'view'    => array(
96
+                'url'   => $invoice->get_view_url(),
97
+                'name'  => __( 'View Invoice', 'invoicing' ),
98
+                'class' => 'btn-primary',
99
+            ),
94 100
 
95
-        'view'    => array(
96
-            'url'   => $invoice->get_view_url(),
97
-            'name'  => __( 'View Invoice', 'invoicing' ),
98
-            'class' => 'btn-primary',
99
-        ),
101
+            'history' => array(
102
+                'url'   => wpinv_get_history_page_uri(),
103
+                'name'  => __( 'Invoice History', 'invoicing' ),
104
+                'class' => 'btn-warning',
105
+            ),
100 106
 
101
-        'history' => array(
102
-            'url'   => wpinv_get_history_page_uri(),
103
-            'name'  => __( 'Invoice History', 'invoicing' ),
104
-            'class' => 'btn-warning',
105 107
         ),
108
+        $invoice
109
+    );
106 110
 
107
-    ),
108
-    $invoice
109
-);
110
-
111
-if ( ( ! $invoice->needs_payment() || $invoice->is_held() ) && isset( $invoice_actions['pay'] ) ) {
112
-    unset( $invoice_actions['pay'] );
111
+    if ( ( ! $invoice->needs_payment() || $invoice->is_held() ) && isset( $invoice_actions['pay'] ) ) {
112
+        unset( $invoice_actions['pay'] );
113 113
 }
114 114
 
115
-if ( ! is_user_logged_in() && isset( $invoice_actions['history'] ) ) {
116
-    unset( $invoice_actions['history'] );
115
+    if ( ! is_user_logged_in() && isset( $invoice_actions['history'] ) ) {
116
+        unset( $invoice_actions['history'] );
117 117
 }
118 118
 
119
-?>
119
+    ?>
120 120
 
121 121
     <div class="wpinv-receipt">
122 122
 
123 123
         <?php
124 124
 
125
-            do_action( 'wpinv_receipt_start', $invoice );
125
+                do_action( 'wpinv_receipt_start', $invoice );
126 126
 
127
-            if ( ! empty( $invoice_actions ) ) {
127
+                if ( ! empty( $invoice_actions ) ) {
128 128
 
129
-			echo '<div class="wpinv-receipt-actions text-right mt-1 mb-4">';
129
+			    echo '<div class="wpinv-receipt-actions text-right mt-1 mb-4">';
130 130
 
131
-			foreach ( $invoice_actions as $key => $invoice_action ) {
131
+			    foreach ( $invoice_actions as $key => $invoice_action ) {
132 132
 
133
-				$key    = sanitize_html_class( $key );
134
-				$class  = empty( $invoice_action['class'] ) ? 'btn-dark' : sanitize_html_class( $invoice_action['class'] );
135
-				$url    = empty( $invoice_action['url'] ) ? '#' : esc_url( $invoice_action['url'] );
136
-				$attrs  = empty( $invoice_action['attrs'] ) ? '' : $invoice_action['attrs'];
137
-				$anchor = esc_html( $invoice_action['name'] );
133
+				    $key    = sanitize_html_class( $key );
134
+				    $class  = empty( $invoice_action['class'] ) ? 'btn-dark' : sanitize_html_class( $invoice_action['class'] );
135
+				    $url    = empty( $invoice_action['url'] ) ? '#' : esc_url( $invoice_action['url'] );
136
+				    $attrs  = empty( $invoice_action['attrs'] ) ? '' : $invoice_action['attrs'];
137
+				    $anchor = esc_html( $invoice_action['name'] );
138 138
 
139
-				echo wp_kses_post( "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>" );
140
-                }
139
+				    echo wp_kses_post( "<a href='$url' class='btn btn-sm ml-1 $class $key' $attrs>$anchor</a>" );
140
+                    }
141 141
 
142
-			echo '</div>';
142
+			    echo '</div>';
143 143
 
144
-            }
144
+                }
145 145
 
146
-            if ( ! empty( $alert ) ) {
147
-			echo wp_kses_post( $alert );
148
-            }
146
+                if ( ! empty( $alert ) ) {
147
+			    echo wp_kses_post( $alert );
148
+                }
149 149
 
150
-        ?>
150
+            ?>
151 151
 
152 152
         <div class="wpinv-receipt-details">
153 153
 
154 154
             <h4 class="wpinv-details-t mb-3 mt-3">
155 155
                 <?php echo esc_html( apply_filters( 'wpinv_receipt_details_title', __( 'Invoice Details', 'invoicing' ), $invoice ) ); ?>
156
-            </h4>
156
+                </h4>
157 157
 
158 158
             <?php getpaid_invoice_meta( $invoice ); ?>
159 159
 
@@ -165,6 +165,6 @@  discard block
 block discarded – undo
165 165
 
166 166
 <?php
167 167
 
168
-// @deprecated
169
-do_action( 'wpinv_success_content_after', $invoice );
170
-do_action( 'wpinv_after_receipt', $invoice );
168
+    // @deprecated
169
+    do_action( 'wpinv_success_content_after', $invoice );
170
+    do_action( 'wpinv_after_receipt', $invoice );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-subscription_complete.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the completed subscription email.
4 4
  *
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Subscription $object
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-$invoice = $object->get_parent_payment();
13
+    $invoice = $object->get_parent_payment();
14 14
 
15
-// Print the email header.
16
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
15
+    // Print the email header.
16
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
17 17
 
18
-// Generate the custom message body.
19
-echo wp_kses_post( $message_body );
18
+    // Generate the custom message body.
19
+    echo wp_kses_post( $message_body );
20 20
 
21
-// Print the billing details.
22
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
21
+    // Print the billing details.
22
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the email footer.
25
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
24
+    // Print the email footer.
25
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-user_note.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the user note invoice email.
4 4
  *
@@ -7,21 +7,21 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
12
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
13 13
 
14
-do_action( 'wpinv_email_before_note_details', $invoice, $email_type, $sent_to_admin, $customer_note );
14
+    do_action( 'wpinv_email_before_note_details', $invoice, $email_type, $sent_to_admin, $customer_note );
15 15
 
16
-// Generate the custom message body.
17
-echo wp_kses_post( wptexturize( str_replace( '{customer_note}', $customer_note, $message_body ) ) );
16
+    // Generate the custom message body.
17
+    echo wp_kses_post( wptexturize( str_replace( '{customer_note}', $customer_note, $message_body ) ) );
18 18
 
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
19
+    do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
20 20
 
21
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
21
+    do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
22 22
 
23
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
23
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
24 24
 
25
-do_action( 'wpinv_email_after_note_details', $invoice, $email_type, $sent_to_admin, $customer_note );
25
+    do_action( 'wpinv_email_after_note_details', $invoice, $email_type, $sent_to_admin, $customer_note );
26 26
 
27
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
27
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-refunded_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the refunded invoice email.
4 4
  *
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-// Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
12
+    // Print the email header.
13
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
14 14
 
15
-// Generate the custom message body.
16
-echo wp_kses_post( $message_body );
15
+    // Generate the custom message body.
16
+    echo wp_kses_post( $message_body );
17 17
 
18
-// Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
18
+    // Print invoice details.
19
+    do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
20 20
 
21
-// Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
21
+    // Print invoice items.
22
+    do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
24
+    // Print the billing details.
25
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
26 26
 
27
-// Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
27
+    // Print the email footer.
28
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-completed_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generates the completed invoice email.
4 4
  *
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-// Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
12
+    // Print the email header.
13
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
14 14
 
15
-// Generate the custom message body.
16
-echo wp_kses_post( $message_body );
15
+    // Generate the custom message body.
16
+    echo wp_kses_post( $message_body );
17 17
 
18
-// Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
18
+    // Print invoice details.
19
+    do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
20 20
 
21
-// Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
21
+    // Print invoice items.
22
+    do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
24
+    // Print the billing details.
25
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
26 26
 
27
-// Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
27
+    // Print the email footer.
28
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-header.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1
-<?php
2
-// don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
1
+    <?php
2
+    // don't load directly
3
+    if ( ! defined( 'ABSPATH' ) ) {
4
+        die( '-1' );
5 5
 }
6 6
 
7
-if ( ! isset( $email_heading ) ) {
8
-    global $email_heading;
7
+    if ( ! isset( $email_heading ) ) {
8
+        global $email_heading;
9 9
 }
10
-?>
10
+    ?>
11 11
 <!DOCTYPE html>
12 12
 <html dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
13 13
     <head>
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
                     <td align="center" valign="top">
24 24
                         <div id="template_header_image">
25 25
                         <?php
26
-                            $img = wpinv_get_option( 'email_header_image', '' );
27
-                            if ( $img ) {
28
-							echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
29
-                            }
30
-                        ?>
26
+                                $img = wpinv_get_option( 'email_header_image', '' );
27
+                                if ( $img ) {
28
+							    echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
29
+                                }
30
+                            ?>
31 31
                         </div>
32 32
                         <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
33 33
                             <?php if ( ! empty( $email_heading ) ) { ?>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-cancelled_invoice.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Template that generated the cancelled invoice email.
4 4
  *
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+    defined( 'ABSPATH' ) || exit;
11 11
 
12
-// Print the email header.
13
-do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
12
+    // Print the email header.
13
+    do_action( 'wpinv_email_header', $email_heading, $invoice, $email_type, $sent_to_admin );
14 14
 
15
-// Generate the custom message body.
16
-echo wp_kses_post( $message_body );
15
+    // Generate the custom message body.
16
+    echo wp_kses_post( $message_body );
17 17
 
18
-// Print invoice details.
19
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
18
+    // Print invoice details.
19
+    do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
20 20
 
21
-// Print invoice items.
22
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
21
+    // Print invoice items.
22
+    do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print the billing details.
25
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
24
+    // Print the billing details.
25
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
26 26
 
27
-// Print the email footer.
28
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
27
+    // Print the email footer.
28
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.
templates/emails/invoice-items.php 1 patch
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays line items in emails.
4 4
  *
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-$column_count = count( $columns );
14
-?>
15
-
16
-<?php do_action( 'wpinv_before_email_items', $invoice ); ?>
13
+    $column_count = count( $columns );
14
+    ?>
15
+    
16
+    <?php do_action( 'wpinv_before_email_items', $invoice ); ?>
17 17
 
18 18
 
19 19
 <div id="wpinv-email-items">
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
             <tr class="wpinv_cart_header_row">
30 30
 
31 31
                 <?php foreach ( $columns as $key => $label ) : ?>
32
-                    <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $key ); ?>">
32
+                        <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo esc_attr( $key ); ?>">
33 33
                         <?php echo esc_html( $label ); ?>
34
-                    </th>
34
+                        </th>
35 35
                 <?php endforeach; ?>
36 36
 
37 37
             </tr>
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
 
43 43
             <?php
44 44
 
45
-                // Display the item totals.
46
-                foreach ( $invoice->get_items() as $item ) {
47
-				wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
48
-                }
45
+                    // Display the item totals.
46
+                    foreach ( $invoice->get_items() as $item ) {
47
+				    wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
48
+                    }
49 49
 
50
-                // Display the fee totals.
51
-                foreach ( $invoice->get_fees() as $fee ) {
52
-				wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
53
-                }
50
+                    // Display the fee totals.
51
+                    foreach ( $invoice->get_fees() as $fee ) {
52
+				    wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
53
+                    }
54 54
 
55
-            ?>
55
+                ?>
56 56
 
57 57
         </tbody>
58 58
 
Please login to merge, or discard this patch.
templates/emails/wpinv-email-billing-details.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1
-<?php
2
-// don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
1
+    <?php
2
+    // don't load directly
3
+    if ( ! defined( 'ABSPATH' ) ) {
4
+        die( '-1' );
5 5
 }
6 6
 
7
-do_action( 'wpinv_email_before_billing_details', $invoice ); ?>
7
+    do_action( 'wpinv_email_before_billing_details', $invoice ); ?>
8 8
 <div id="wpinv-email-billing">
9 9
     <h3 class="wpinv-address-t"><?php echo esc_html( apply_filters( 'wpinv_email_billing_title', __( 'Billing Details', 'invoicing' ) ) ); ?></h3>
10 10
 
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
                 <th class="text-left"><?php esc_html_e( 'Name', 'invoicing' ); ?></th>
16 16
                 <td>
17 17
                 <?php
18
-                if ( $sent_to_admin && $invoice->get_user_id() ) {
19
-?>
20
-<a href="<?php echo esc_url( add_query_arg( 'user_id', $invoice->get_user_id(), self_admin_url( 'user-edit.php' ) ) ); ?>"><?php echo esc_html( $invoice->get_user_full_name() ); ?></a>
18
+                    if ( $sent_to_admin && $invoice->get_user_id() ) {
19
+    ?>
20
+    <a href="<?php echo esc_url( add_query_arg( 'user_id', $invoice->get_user_id(), self_admin_url( 'user-edit.php' ) ) ); ?>"><?php echo esc_html( $invoice->get_user_full_name() ); ?></a>
21 21
                     <?php
22 22
 } else {
23
-					echo esc_html( $invoice->get_user_full_name() ); }
24
-?>
23
+					    echo esc_html( $invoice->get_user_full_name() ); }
24
+    ?>
25 25
 </td>
26 26
             </tr>
27 27
             <tr class="wpi-receipt-email">
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 <td><?php echo esc_html( $invoice->get_phone() ); ?></td>
45 45
             </tr>
46 46
             <?php } ?>
47
-            <?php do_action( 'wpinv_email_billing_fields_last', $invoice ); ?>
47
+                <?php do_action( 'wpinv_email_billing_fields_last', $invoice ); ?>
48 48
         </tbody>
49 49
     </table>
50 50
 </div>
Please login to merge, or discard this patch.