Passed
Push — master ( cc4fca...f27c0a )
by Stiofan
05:46
created
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.
templates/emails/fee-item.php 1 patch
Switch Indentation   +44 added lines, -44 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 single fee items in emails.
4 4
  *
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
  * @var array $columns
11 11
  */
12 12
 
13
-defined( 'ABSPATH' ) || exit;
13
+    defined( 'ABSPATH' ) || exit;
14 14
 
15
-?>
16
-
17
-<?php do_action( 'getpaid_before_email_fee_item', $invoice, $fee ); ?>
15
+    ?>
16
+    
17
+    <?php do_action( 'getpaid_before_email_fee_item', $invoice, $fee ); ?>
18 18
 
19 19
 <tr class="wpinv_cart_item item-fee">
20 20
 
@@ -24,55 +24,55 @@  discard block
 block discarded – undo
24 24
             
25 25
             <?php
26 26
 
27
-                // Fires before printing a fee item column.
28
-                do_action( "getpaid_email_fee_item_before_$column", $fee, $invoice );
27
+                    // Fires before printing a fee item column.
28
+                    do_action( "getpaid_email_fee_item_before_$column", $fee, $invoice );
29
+
30
+                    // Item name.
31
+                    if ( 'name' == $column ) {
32
+
33
+				    // Display the name.
34
+				    echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>';
29 35
 
30
-                // Item name.
31
-                if ( 'name' == $column ) {
36
+				    // And an optional description.
37
+				    $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
38
+				    echo wp_kses_post( "<p class='small'>$description</p>" );
32 39
 
33
-				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>';
40
+                    }
35 41
 
36
-				// And an optional description.
37
-				$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
38
-				echo wp_kses_post( "<p class='small'>$description</p>" );
42
+                    // Item price.
43
+                    if ( 'price' == $column ) {
39 44
 
40
-                }
45
+				    // Display the item price (or recurring price if this is a renewal invoice)
46
+				    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
47
+					    wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
48
+                        } else {
49
+                            wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
50
+                        }
51
+}
41 52
 
42
-                // Item price.
43
-                if ( 'price' == $column ) {
53
+                    // Item quantity.
54
+                    if ( 'quantity' == $column ) {
55
+				    echo '&mdash;';
56
+                    }
44 57
 
45
-				// Display the item price (or recurring price if this is a renewal invoice)
46
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
47
-					wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
58
+                    // Item tax.
59
+                    if ( 'tax_rate' == $column ) {
60
+				    echo '&mdash;';
61
+                    }
62
+
63
+                    // Item sub total.
64
+                    if ( 'subtotal' == $column ) {
65
+				    if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
66
+					    wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
48 67
                     } else {
49 68
                         wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
50 69
                     }
51
-}
70
+                    }
71
+
72
+                    // Fires when printing a line item column.
73
+                    do_action( "getpaid_email_fee_item_$column", $fee, $invoice );
52 74
 
53
-                // Item quantity.
54
-                if ( 'quantity' == $column ) {
55
-				echo '&mdash;';
56
-                }
57
-
58
-                // Item tax.
59
-                if ( 'tax_rate' == $column ) {
60
-				echo '&mdash;';
61
-                }
62
-
63
-                // Item sub total.
64
-                if ( 'subtotal' == $column ) {
65
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
66
-					wpinv_the_price( $fee['recurring_fee'], $invoice->get_currency() );
67
-                } else {
68
-                    wpinv_the_price( $fee['initial_fee'], $invoice->get_currency() );
69
-                }
70
-                }
71
-
72
-                // Fires when printing a line item column.
73
-                do_action( "getpaid_email_fee_item_$column", $fee, $invoice );
74
-
75
-            ?>
75
+                ?>
76 76
 
77 77
         </td>
78 78
 
Please login to merge, or discard this patch.
templates/emails/wpinv-email-failed_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 failed 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.