Passed
Push — master ( f411ba...4d2fb8 )
by Brian
05:15
created
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.
templates/emails/invoice-details.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
  * Displays invoice details in emails.
4 4
  *
@@ -8,17 +8,17 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  * @var array $columns
10 10
  */
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-$meta_data = getpaid_get_invoice_meta( $invoice );
13
+    $meta_data = getpaid_get_invoice_meta( $invoice );
14 14
 
15
-if ( isset( $meta_data['status'] ) ) {
16
-    $meta_data['status']['value'] = $invoice->get_status_nicename();
15
+    if ( isset( $meta_data['status'] ) ) {
16
+        $meta_data['status']['value'] = $invoice->get_status_nicename();
17 17
 }
18 18
 
19
-do_action( 'wpinv_email_before_invoice_details', $invoice, $sent_to_admin );
19
+    do_action( 'wpinv_email_before_invoice_details', $invoice, $sent_to_admin );
20 20
 
21
-?>
21
+    ?>
22 22
 
23 23
 <div id="wpinv-email-details">
24 24
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     <table class="table table-bordered table-sm">
30 30
 
31 31
         <?php foreach ( $meta_data as $key => $data ) : ?>
32
-
32
+    
33 33
             <?php if ( ! empty( $data['value'] ) ) : ?>
34
-
34
+    
35 35
                 <?php do_action( "getpaid_before_email_details_$key", $invoice, $data ); ?>
36 36
 
37 37
                 <tr class="getpaid-email-details-<?php echo esc_attr( $key ); ?>">
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
                 </tr>
48 48
 
49 49
                 <?php do_action( "getpaid_after_email_details_$key", $invoice, $data ); ?>
50
-
50
+    
51 51
             <?php endif; ?>
52
-
52
+    
53 53
         <?php endforeach; ?>
54 54
 
55 55
     </table>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-subscription_expired.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 expired 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-styles.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 email styles.
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
-$bg              = wpinv_get_option( 'email_background_color', '#f5f5f5' );
13
-$body            = wpinv_get_option( 'email_body_background_color', '#fdfdfd' );
14
-$base            = wpinv_get_option( 'email_base_color', '#557da2' );
15
-$base_text       = wpinv_light_or_dark( $base, '#202020', '#ffffff' );
16
-$text            = wpinv_get_option( 'email_text_color', '#505050' );
12
+    $bg              = wpinv_get_option( 'email_background_color', '#f5f5f5' );
13
+    $body            = wpinv_get_option( 'email_body_background_color', '#fdfdfd' );
14
+    $base            = wpinv_get_option( 'email_base_color', '#557da2' );
15
+    $base_text       = wpinv_light_or_dark( $base, '#202020', '#ffffff' );
16
+    $text            = wpinv_get_option( 'email_text_color', '#505050' );
17 17
 
18
-$bg_darker_10    = wpinv_hex_darker( $bg, 10 );
19
-$body_darker_10  = wpinv_hex_darker( $body, 10 );
20
-$base_lighter_20 = wpinv_hex_lighter( $base, 20 );
21
-$base_lighter_40 = wpinv_hex_lighter( $base, 40 );
22
-$text_lighter_20 = wpinv_hex_lighter( $text, 20 );
18
+    $bg_darker_10    = wpinv_hex_darker( $bg, 10 );
19
+    $body_darker_10  = wpinv_hex_darker( $body, 10 );
20
+    $base_lighter_20 = wpinv_hex_lighter( $base, 20 );
21
+    $base_lighter_40 = wpinv_hex_lighter( $base, 40 );
22
+    $text_lighter_20 = wpinv_hex_lighter( $text, 20 );
23 23
 
24
-// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
25
-?>
24
+    // !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
25
+    ?>
26 26
 #wrapper {
27 27
     background-color: <?php echo esc_attr( $bg ); ?>;
28 28
     margin: 0;
Please login to merge, or discard this patch.
templates/emails/wpinv-email-subscription_cancelled.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 cancelled 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-footer.php 1 patch
Switch Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 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
-$email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text', get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ) ) );
8
-$email_footer = $email_footer ? wp_kses_post( wpautop( wptexturize( $email_footer ) ) ) : '';
9
-?>
7
+    $email_footer = apply_filters( 'wpinv_email_footer_text', wpinv_get_option( 'email_footer_text', get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by GetPaid', 'invoicing' ) ) );
8
+    $email_footer = $email_footer ? wp_kses_post( wpautop( wptexturize( $email_footer ) ) ) : '';
9
+    ?>
10 10
                                                             </div>
11 11
                                                         </td>
12 12
                                                     </tr>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-overdue.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 overdue emails.
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-new_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 new 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.