Passed
Push — master ( 55fff1...2692d4 )
by Brian
16:18
created
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.
templates/emails/wpinv-email-renewal_reminder.php 1 patch
Switch Indentation   +15 added lines, -15 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 upcoming renewal subscription email.
4 4
  *
@@ -8,24 +8,24 @@  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 invoice details.
22
-do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
21
+    // Print invoice details.
22
+    do_action( 'wpinv_email_invoice_details', $invoice, $email_type, $sent_to_admin );
23 23
 
24
-// Print invoice items.
25
-do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
24
+    // Print invoice items.
25
+    do_action( 'wpinv_email_invoice_items', $invoice, $email_type, $sent_to_admin );
26 26
 
27
-// Print the billing details.
28
-do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
27
+    // Print the billing details.
28
+    do_action( 'wpinv_email_billing_details', $invoice, $email_type, $sent_to_admin );
29 29
 
30
-// Print the email footer.
31
-do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
30
+    // Print the email footer.
31
+    do_action( 'wpinv_email_footer', $invoice, $email_type, $sent_to_admin );
Please login to merge, or discard this patch.