Passed
Push — master ( 0a2cdb...97ebee )
by Brian
04:41
created
templates/wpinv-payment-processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
     <p>
4 4
         <?php
5 5
             echo wp_sprintf(
6
-                __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ),
7
-                esc_url_raw( remove_query_arg( 'payment-confirm' ) )
6
+                __('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing'),
7
+                esc_url_raw(remove_query_arg('payment-confirm'))
8 8
             );
9 9
         ?>
10 10
         <i class="fa fa-spin fa-refresh"></i>
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     <script type="text/javascript">
14 14
         setTimeout(
15 15
             function(){
16
-                window.location.href = '<?php echo esc_url_raw( remove_query_arg( 'payment-confirm' ) ); ?>';
16
+                window.location.href = '<?php echo esc_url_raw(remove_query_arg('payment-confirm')); ?>';
17 17
             },
18 18
             10000
19 19
         );
Please login to merge, or discard this patch.
templates/emails/wpinv-email-footer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
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 ? wpautop( wp_kses_post( wptexturize( $email_footer ) ) ) : '';
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 ? wpautop(wp_kses_post(wptexturize($email_footer))) : '';
9 9
 ?>
10 10
                                                             </div>
11 11
                                                         </td>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
                                                 <table border="0" cellpadding="10" cellspacing="0" width="100%">
28 28
                                                     <tr>
29 29
                                                         <td colspan="2" valign="middle" id="credit">
30
-                                                            <?php echo wp_kses_post( $email_footer ); ?>
30
+                                                            <?php echo wp_kses_post($email_footer); ?>
31 31
                                                         </td>
32 32
                                                     </tr>
33 33
                                                 </table>
Please login to merge, or discard this patch.
templates/emails/invoice-items.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
 
45 45
                 // Display the item totals.
46 46
                 foreach ( $invoice->get_items() as $item ) {
47
-				wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
47
+                wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
48 48
                 }
49 49
 
50 50
                 // Display the fee totals.
51 51
                 foreach ( $invoice->get_fees() as $fee ) {
52
-				wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
52
+                wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
53 53
                 }
54 54
 
55 55
             ?>
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  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 );
13
+$column_count = count($columns);
14 14
 ?>
15 15
 
16
-<?php do_action( 'wpinv_before_email_items', $invoice ); ?>
16
+<?php do_action('wpinv_before_email_items', $invoice); ?>
17 17
 
18 18
 
19 19
 <div id="wpinv-email-items">
20 20
 
21 21
     <h3 class="invoice-items-title">
22
-        <?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ) ); ?>
22
+        <?php echo sprintf(esc_html__('%s Items', 'invoicing'), esc_html(ucfirst($invoice->get_invoice_quote_type()))); ?>
23 23
     </h3>
24 24
 
25 25
     <table class="table table-bordered table-hover">
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
             <tr class="wpinv_cart_header_row">
30 30
 
31
-                <?php foreach ( $columns as $key => $label ) : ?>
32
-                    <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class( $key ); ?>">
33
-                        <?php echo esc_html( $label ); ?>
31
+                <?php foreach ($columns as $key => $label) : ?>
32
+                    <th class="<?php echo 'name' == $key ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class($key); ?>">
33
+                        <?php echo esc_html($label); ?>
34 34
                     </th>
35 35
                 <?php endforeach; ?>
36 36
 
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
             <?php
44 44
 
45 45
                 // Display the item totals.
46
-                foreach ( $invoice->get_items() as $item ) {
47
-				wpinv_get_template( 'emails/invoice-item.php', compact( 'invoice', 'item', 'columns' ) );
46
+                foreach ($invoice->get_items() as $item) {
47
+				wpinv_get_template('emails/invoice-item.php', compact('invoice', 'item', 'columns'));
48 48
                 }
49 49
 
50 50
                 // Display the fee totals.
51
-                foreach ( $invoice->get_fees() as $fee ) {
52
-				wpinv_get_template( 'emails/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
51
+                foreach ($invoice->get_fees() as $fee) {
52
+				wpinv_get_template('emails/fee-item.php', compact('invoice', 'fee', 'columns'));
53 53
                 }
54 54
 
55 55
             ?>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         </tbody>
58 58
 
59 59
         <tfoot>
60
-            <?php wpinv_get_template( 'emails/invoice-totals.php', compact( 'invoice', 'column_count' ) ); ?>
60
+            <?php wpinv_get_template('emails/invoice-totals.php', compact('invoice', 'column_count')); ?>
61 61
         </tfoot>
62 62
     
63 63
     </table>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-billing-details.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 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() ); }
23
+                    echo esc_html( $invoice->get_user_full_name() ); }
24 24
 ?>
25 25
 </td>
26 26
             </tr>
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,51 +1,51 @@
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
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
-    <h3 class="wpinv-address-t"><?php echo apply_filters( 'wpinv_email_billing_title', __( 'Billing Details', 'invoicing' ) ); ?></h3>
9
+    <h3 class="wpinv-address-t"><?php echo apply_filters('wpinv_email_billing_title', __('Billing Details', 'invoicing')); ?></h3>
10 10
 
11 11
     <table class="table table-bordered table-sm wpi-billing-details">
12 12
         <tbody>
13
-            <?php do_action( 'wpinv_email_billing_fields_first', $invoice ); ?>
13
+            <?php do_action('wpinv_email_billing_fields_first', $invoice); ?>
14 14
             <tr class="wpi-receipt-name">
15
-                <th class="text-left"><?php _e( 'Name', 'invoicing' ); ?></th>
15
+                <th class="text-left"><?php _e('Name', 'invoicing'); ?></th>
16 16
                 <td>
17 17
                 <?php
18
-                if ( $sent_to_admin && $invoice->get_user_id() ) {
18
+                if ($sent_to_admin && $invoice->get_user_id()) {
19 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>
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() ); }
23
+					echo esc_html($invoice->get_user_full_name()); }
24 24
 ?>
25 25
 </td>
26 26
             </tr>
27 27
             <tr class="wpi-receipt-email">
28
-                <th class="text-left"><?php _e( 'Email', 'invoicing' ); ?></th>
29
-                <td><?php echo sanitize_email( $invoice->get_email() ); ?></td>
28
+                <th class="text-left"><?php _e('Email', 'invoicing'); ?></th>
29
+                <td><?php echo sanitize_email($invoice->get_email()); ?></td>
30 30
             </tr>
31
-            <?php if ( $invoice->get_company() ) { ?>
31
+            <?php if ($invoice->get_company()) { ?>
32 32
             <tr class="wpi-receipt-company">
33
-                <th class="text-left"><?php _e( 'Company', 'invoicing' ); ?></th>
34
-                <td><?php echo esc_html( $invoice->get_company() ); ?></td>
33
+                <th class="text-left"><?php _e('Company', 'invoicing'); ?></th>
34
+                <td><?php echo esc_html($invoice->get_company()); ?></td>
35 35
             </tr>
36 36
             <?php } ?>
37 37
             <tr class="wpi-receipt-address">
38
-                <th class="text-left"><?php _e( 'Address', 'invoicing' ); ?></th>
39
-                <td><?php echo wp_kses_post( wpinv_get_invoice_address_markup( $invoice->get_user_info() ) ); ?></td>
38
+                <th class="text-left"><?php _e('Address', 'invoicing'); ?></th>
39
+                <td><?php echo wp_kses_post(wpinv_get_invoice_address_markup($invoice->get_user_info())); ?></td>
40 40
             </tr>
41
-            <?php if ( $invoice->get_phone() ) { ?>
41
+            <?php if ($invoice->get_phone()) { ?>
42 42
             <tr class="wpi-receipt-phone">
43
-                <th class="text-left"><?php _e( 'Phone', 'invoicing' ); ?></th>
44
-                <td><?php echo esc_html( $invoice->get_phone() ); ?></td>
43
+                <th class="text-left"><?php _e('Phone', 'invoicing'); ?></th>
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>
51
-<?php do_action( 'wpinv_email_after_billing_details', $invoice ); ?>
51
+<?php do_action('wpinv_email_after_billing_details', $invoice); ?>
Please login to merge, or discard this patch.
templates/emails/invoice-totals.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,26 +45,26 @@
 block discarded – undo
45 45
 
46 46
                 // Total tax.
47 47
                 if ( 'tax' == $key ) {
48
-				echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
48
+                echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
49 49
                 }
50 50
 
51 51
                 if ( 'fee' == $key ) {
52
-				echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
52
+                echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
53 53
                 }
54 54
 
55 55
                 // Total discount.
56 56
                 if ( 'discount' == $key ) {
57
-				echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
57
+                echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
58 58
                 }
59 59
 
60 60
                 // Sub total.
61 61
                 if ( 'subtotal' == $key ) {
62
-				echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
62
+                echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
63 63
                 }
64 64
 
65 65
                 // Total.
66 66
                 if ( 'total' == $key ) {
67
-				echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
67
+                echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
68 68
                 }
69 69
 
70 70
                 // Fires when printing a cart total in an email.
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,22 +8,22 @@  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 13
 // Totals rows.
14
-$totals = getpaid_invoice_totals_rows( $invoice );
14
+$totals = getpaid_invoice_totals_rows($invoice);
15 15
 
16
-do_action( 'getpaid_before_email_line_totals', $invoice, $totals );
16
+do_action('getpaid_before_email_line_totals', $invoice, $totals);
17 17
 
18 18
 ?>
19 19
 
20 20
 
21
-<?php if ( has_action( 'wpinv_email_footer_buttons' ) ) : ?>
21
+<?php if (has_action('wpinv_email_footer_buttons')) : ?>
22 22
 
23 23
     <tr class="wpinv_cart_footer_row">
24 24
 
25
-        <td colspan="<?php echo ( (int) $column_count ); ?>">
26
-            <?php do_action( 'wpinv_email_footer_buttons' ); ?>
25
+        <td colspan="<?php echo ((int) $column_count); ?>">
26
+            <?php do_action('wpinv_email_footer_buttons'); ?>
27 27
         </td>
28 28
 
29 29
     </tr>
@@ -31,44 +31,44 @@  discard block
 block discarded – undo
31 31
 <?php endif; ?>
32 32
 
33 33
 
34
-<?php foreach ( $totals as $key => $label ) : ?>
34
+<?php foreach ($totals as $key => $label) : ?>
35 35
 
36
-    <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_row">
36
+    <tr class="wpinv_cart_footer_row wpinv_cart_<?php echo sanitize_html_class($key); ?>_row">
37 37
 
38
-        <td colspan="<?php echo ( $column_count - 1 ); ?>" class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?>_label text-right">
39
-            <strong><?php echo esc_html( $label ); ?>:</strong>
38
+        <td colspan="<?php echo ($column_count - 1); ?>" class="wpinv_cart_<?php echo sanitize_html_class($key); ?>_label text-right">
39
+            <strong><?php echo esc_html($label); ?>:</strong>
40 40
         </td>
41 41
 
42
-        <td class="wpinv_cart_<?php echo sanitize_html_class( $key ); ?> text-right">
42
+        <td class="wpinv_cart_<?php echo sanitize_html_class($key); ?> text-right">
43 43
 
44 44
             <?php
45 45
 
46 46
                 // Total tax.
47
-                if ( 'tax' == $key ) {
48
-				echo wpinv_price( $invoice->get_total_tax(), $invoice->get_currency() );
47
+                if ('tax' == $key) {
48
+				echo wpinv_price($invoice->get_total_tax(), $invoice->get_currency());
49 49
                 }
50 50
 
51
-                if ( 'fee' == $key ) {
52
-				echo wpinv_price( $invoice->get_total_fees(), $invoice->get_currency() );
51
+                if ('fee' == $key) {
52
+				echo wpinv_price($invoice->get_total_fees(), $invoice->get_currency());
53 53
                 }
54 54
 
55 55
                 // Total discount.
56
-                if ( 'discount' == $key ) {
57
-				echo wpinv_price( $invoice->get_total_discount(), $invoice->get_currency() );
56
+                if ('discount' == $key) {
57
+				echo wpinv_price($invoice->get_total_discount(), $invoice->get_currency());
58 58
                 }
59 59
 
60 60
                 // Sub total.
61
-                if ( 'subtotal' == $key ) {
62
-				echo wpinv_price( $invoice->get_subtotal(), $invoice->get_currency() );
61
+                if ('subtotal' == $key) {
62
+				echo wpinv_price($invoice->get_subtotal(), $invoice->get_currency());
63 63
                 }
64 64
 
65 65
                 // Total.
66
-                if ( 'total' == $key ) {
67
-				echo wpinv_price( $invoice->get_total(), $invoice->get_currency() );
66
+                if ('total' == $key) {
67
+				echo wpinv_price($invoice->get_total(), $invoice->get_currency());
68 68
                 }
69 69
 
70 70
                 // Fires when printing a cart total in an email.
71
-                do_action( "getpaid_email_cart_totals_$key", $invoice );
71
+                do_action("getpaid_email_cart_totals_$key", $invoice);
72 72
 
73 73
             ?>
74 74
 
@@ -80,4 +80,4 @@  discard block
 block discarded – undo
80 80
 
81 81
 <?php
82 82
 
83
-    do_action( 'getpaid_after_email_line_totals', $invoice, $totals );
83
+    do_action('getpaid_after_email_line_totals', $invoice, $totals);
Please login to merge, or discard this patch.
templates/emails/invoice-item.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,41 +30,41 @@
 block discarded – undo
30 30
                 // Item name.
31 31
                 if ( 'name' == $column ) {
32 32
 
33
-				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
33
+                // Display the name.
34
+                echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
35 35
 
36
-				// And an optional description.
37
-				$description = $item->get_description();
36
+                // And an optional description.
37
+                $description = $item->get_description();
38 38
 
39
-				if ( ! empty( $description ) ) {
40
-					$description = wp_kses_post( $description );
41
-					echo "<p class='small'>$description</p>";
39
+                if ( ! empty( $description ) ) {
40
+                    $description = wp_kses_post( $description );
41
+                    echo "<p class='small'>$description</p>";
42 42
                     }
43 43
 }
44 44
 
45 45
                 // Item price.
46 46
                 if ( 'price' == $column ) {
47 47
 
48
-				// Display the item price (or recurring price if this is a renewal invoice)
49
-				$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
50
-				echo wpinv_price( $price, $invoice->get_currency() );
48
+                // Display the item price (or recurring price if this is a renewal invoice)
49
+                $price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
50
+                echo wpinv_price( $price, $invoice->get_currency() );
51 51
 
52 52
                 }
53 53
 
54 54
                 // Item quantity.
55 55
                 if ( 'quantity' == $column ) {
56
-				echo (float) $item->get_quantity();
56
+                echo (float) $item->get_quantity();
57 57
                 }
58 58
 
59 59
                 // Tax rate.
60 60
                 if ( 'tax_rate' == $column ) {
61
-				echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
61
+                echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
62 62
                 }
63 63
 
64 64
                 // Item sub total.
65 65
                 if ( 'subtotal' == $column ) {
66
-				$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
67
-				echo wpinv_price( $subtotal, $invoice->get_currency() );
66
+                $subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
67
+                echo wpinv_price( $subtotal, $invoice->get_currency() );
68 68
                 }
69 69
 
70 70
                 // Fires when printing a line item column.
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,65 +10,65 @@  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 15
 ?>
16 16
 
17
-<?php do_action( 'getpaid_before_email_line_item', $invoice, $item ); ?>
17
+<?php do_action('getpaid_before_email_line_item', $invoice, $item); ?>
18 18
 
19
-<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class( $item->get_type() ); ?>">
19
+<tr class="wpinv_cart_item item-type-<?php echo sanitize_html_class($item->get_type()); ?>">
20 20
 
21
-    <?php foreach ( array_keys( $columns ) as $column ) : ?>
21
+    <?php foreach (array_keys($columns) as $column) : ?>
22 22
 
23
-        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class( $column ); ?>">
23
+        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class($column); ?>">
24 24
             
25 25
             <?php
26 26
 
27 27
                 // Fires before printing a line item column.
28
-                do_action( "getpaid_email_line_item_before_$column", $item, $invoice );
28
+                do_action("getpaid_email_line_item_before_$column", $item, $invoice);
29 29
 
30 30
                 // Item name.
31
-                if ( 'name' == $column ) {
31
+                if ('name' == $column) {
32 32
 
33 33
 				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $item->get_name() ) . '</div>';
34
+				echo '<div class="wpinv_email_cart_item_title">' . esc_html($item->get_name()) . '</div>';
35 35
 
36 36
 				// And an optional description.
37 37
 				$description = $item->get_description();
38 38
 
39
-				if ( ! empty( $description ) ) {
40
-					$description = wp_kses_post( $description );
39
+				if (!empty($description)) {
40
+					$description = wp_kses_post($description);
41 41
 					echo "<p class='small'>$description</p>";
42 42
                     }
43 43
 }
44 44
 
45 45
                 // Item price.
46
-                if ( 'price' == $column ) {
46
+                if ('price' == $column) {
47 47
 
48 48
 				// Display the item price (or recurring price if this is a renewal invoice)
49 49
 				$price = $invoice->is_renewal() ? $item->get_price() : $item->get_initial_price();
50
-				echo wpinv_price( $price, $invoice->get_currency() );
50
+				echo wpinv_price($price, $invoice->get_currency());
51 51
 
52 52
                 }
53 53
 
54 54
                 // Item quantity.
55
-                if ( 'quantity' == $column ) {
55
+                if ('quantity' == $column) {
56 56
 				echo (float) $item->get_quantity();
57 57
                 }
58 58
 
59 59
                 // Tax rate.
60
-                if ( 'tax_rate' == $column ) {
61
-				echo round( getpaid_get_invoice_tax_rate( $invoice, $item ), 2 ) . '%';
60
+                if ('tax_rate' == $column) {
61
+				echo round(getpaid_get_invoice_tax_rate($invoice, $item), 2) . '%';
62 62
                 }
63 63
 
64 64
                 // Item sub total.
65
-                if ( 'subtotal' == $column ) {
65
+                if ('subtotal' == $column) {
66 66
 				$subtotal = $invoice->is_renewal() ? $item->get_recurring_sub_total() : $item->get_sub_total();
67
-				echo wpinv_price( $subtotal, $invoice->get_currency() );
67
+				echo wpinv_price($subtotal, $invoice->get_currency());
68 68
                 }
69 69
 
70 70
                 // Fires when printing a line item column.
71
-                do_action( "getpaid_email_line_item_$column", $item, $invoice );
71
+                do_action("getpaid_email_line_item_$column", $item, $invoice);
72 72
 
73 73
             ?>
74 74
 
@@ -78,4 +78,4 @@  discard block
 block discarded – undo
78 78
 
79 79
 </tr>
80 80
 
81
-<?php do_action( 'getpaid_after_email_line_item', $invoice, $item ); ?>
81
+<?php do_action('getpaid_after_email_line_item', $invoice, $item); ?>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-header.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                         <div id="template_header_image">
25 25
                         <?php
26 26
                             if ( $img = wpinv_get_option( 'email_header_image', '' ) ) {
27
-							echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
27
+                            echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
28 28
                             }
29 29
                         ?>
30 30
                         </div>
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // don't load directly
3
-if ( ! defined( 'ABSPATH' ) ) {
4
-    die( '-1' );
3
+if (!defined('ABSPATH')) {
4
+    die('-1');
5 5
 }
6 6
 
7
-if ( ! isset( $email_heading ) ) {
7
+if (!isset($email_heading)) {
8 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>
14
-        <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
14
+        <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
15 15
         <meta name="viewport" content="width=device-width, initial-scale=1">
16 16
         <meta name="robots" content="noindex,nofollow">
17
-        <title><?php echo esc_html( wpinv_get_blogname() ); ?></title>
17
+        <title><?php echo esc_html(wpinv_get_blogname()); ?></title>
18 18
     </head>
19 19
     <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
20 20
         <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
@@ -23,20 +23,20 @@  discard block
 block discarded – undo
23 23
                     <td align="center" valign="top">
24 24
                         <div id="template_header_image">
25 25
                         <?php
26
-                            if ( $img = wpinv_get_option( 'email_header_image', '' ) ) {
27
-							echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url( $img ) . '" alt="' . esc_attr( wpinv_get_blogname() ) . '" /></p>';
26
+                            if ($img = wpinv_get_option('email_header_image', '')) {
27
+							echo '<p style="margin-top:0;"><img style="max-width:100%" src="' . esc_url($img) . '" alt="' . esc_attr(wpinv_get_blogname()) . '" /></p>';
28 28
                             }
29 29
                         ?>
30 30
                         </div>
31 31
                         <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
32
-                            <?php if ( ! empty( $email_heading ) ) { ?>
32
+                            <?php if (!empty($email_heading)) { ?>
33 33
                             <tr>
34 34
                                 <td align="center" valign="top">
35 35
                                     <!-- Header -->
36 36
                                     <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header">
37 37
                                         <tr>
38 38
                                             <td id="header_wrapper">
39
-                                                <h1><?php echo esc_html( $email_heading ); ?></h1>
39
+                                                <h1><?php echo esc_html($email_heading); ?></h1>
40 40
                                             </td>
41 41
                                         </tr>
42 42
                                     </table>
Please login to merge, or discard this patch.
templates/emails/wpinv-email-user_note.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@
 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 16
 // Generate the custom message body.
17
-echo wptexturize( wp_kses_post( str_replace( '{customer_note}', $customer_note, $message_body ) ) );
17
+echo wptexturize(wp_kses_post(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/fee-item.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,42 +30,42 @@
 block discarded – undo
30 30
                 // Item name.
31 31
                 if ( 'name' == $column ) {
32 32
 
33
-				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>';
33
+                // Display the name.
34
+                echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>';
35 35
 
36
-				// And an optional description.
37
-				$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
38
-				echo "<p class='small'>$description</p>";
36
+                // And an optional description.
37
+                $description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
38
+                echo "<p class='small'>$description</p>";
39 39
 
40 40
                 }
41 41
 
42 42
                 // Item price.
43 43
                 if ( 'price' == $column ) {
44 44
 
45
-				// Display the item price (or recurring price if this is a renewal invoice)
46
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
47
-					echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
45
+                // Display the item price (or recurring price if this is a renewal invoice)
46
+                if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
47
+                    echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
48 48
                     } else {
49
-					echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
49
+                    echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
50 50
                     }
51 51
 }
52 52
 
53 53
                 // Item quantity.
54 54
                 if ( 'quantity' == $column ) {
55
-				echo '&mdash;';
55
+                echo '&mdash;';
56 56
                 }
57 57
 
58 58
                 // Item tax.
59 59
                 if ( 'tax_rate' == $column ) {
60
-				echo '&mdash;';
60
+                echo '&mdash;';
61 61
                 }
62 62
 
63 63
                 // Item sub total.
64 64
                 if ( 'subtotal' == $column ) {
65
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
66
-					echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
65
+                if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
66
+                    echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
67 67
                     } else {
68
-					echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
68
+                    echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
69 69
                     }
70 70
                 }
71 71
 
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -10,67 +10,67 @@  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 15
 ?>
16 16
 
17
-<?php do_action( 'getpaid_before_email_fee_item', $invoice, $fee ); ?>
17
+<?php do_action('getpaid_before_email_fee_item', $invoice, $fee); ?>
18 18
 
19 19
 <tr class="wpinv_cart_item item-fee">
20 20
 
21
-    <?php foreach ( array_keys( $columns ) as $column ) : ?>
21
+    <?php foreach (array_keys($columns) as $column) : ?>
22 22
 
23
-        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class( $column ); ?>">
23
+        <td class="<?php echo 'name' == $column ? 'text-left' : 'text-right'; ?> wpinv_cart_item_<?php echo sanitize_html_class($column); ?>">
24 24
             
25 25
             <?php
26 26
 
27 27
                 // Fires before printing a fee item column.
28
-                do_action( "getpaid_email_fee_item_before_$column", $fee, $invoice );
28
+                do_action("getpaid_email_fee_item_before_$column", $fee, $invoice);
29 29
 
30 30
                 // Item name.
31
-                if ( 'name' == $column ) {
31
+                if ('name' == $column) {
32 32
 
33 33
 				// Display the name.
34
-				echo '<div class="wpinv_email_cart_item_title">' . esc_html( $fee['name'] ) . '</div>';
34
+				echo '<div class="wpinv_email_cart_item_title">' . esc_html($fee['name']) . '</div>';
35 35
 
36 36
 				// And an optional description.
37
-				$description = empty( $fee['description'] ) ? esc_html__( 'Fee', 'invoicing' ) : esc_html( $fee['description'] );
37
+				$description = empty($fee['description']) ? esc_html__('Fee', 'invoicing') : esc_html($fee['description']);
38 38
 				echo "<p class='small'>$description</p>";
39 39
 
40 40
                 }
41 41
 
42 42
                 // Item price.
43
-                if ( 'price' == $column ) {
43
+                if ('price' == $column) {
44 44
 
45 45
 				// Display the item price (or recurring price if this is a renewal invoice)
46
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
47
-					echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
46
+				if ($invoice->is_recurring() && $invoice->is_renewal()) {
47
+					echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
48 48
                     } else {
49
-					echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
49
+					echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
50 50
                     }
51 51
 }
52 52
 
53 53
                 // Item quantity.
54
-                if ( 'quantity' == $column ) {
54
+                if ('quantity' == $column) {
55 55
 				echo '&mdash;';
56 56
                 }
57 57
 
58 58
                 // Item tax.
59
-                if ( 'tax_rate' == $column ) {
59
+                if ('tax_rate' == $column) {
60 60
 				echo '&mdash;';
61 61
                 }
62 62
 
63 63
                 // Item sub total.
64
-                if ( 'subtotal' == $column ) {
65
-				if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
66
-					echo wpinv_price( $fee['recurring_fee'], $invoice->get_currency() );
64
+                if ('subtotal' == $column) {
65
+				if ($invoice->is_recurring() && $invoice->is_renewal()) {
66
+					echo wpinv_price($fee['recurring_fee'], $invoice->get_currency());
67 67
                     } else {
68
-					echo wpinv_price( $fee['initial_fee'], $invoice->get_currency() );
68
+					echo wpinv_price($fee['initial_fee'], $invoice->get_currency());
69 69
                     }
70 70
                 }
71 71
 
72 72
                 // Fires when printing a line item column.
73
-                do_action( "getpaid_email_fee_item_$column", $fee, $invoice );
73
+                do_action("getpaid_email_fee_item_$column", $fee, $invoice);
74 74
 
75 75
             ?>
76 76
 
@@ -80,4 +80,4 @@  discard block
 block discarded – undo
80 80
 
81 81
 </tr>
82 82
 
83
-<?php do_action( 'getpaid_after_email_fee_item', $invoice, $fee ); ?>
83
+<?php do_action('getpaid_after_email_fee_item', $invoice, $fee); ?>
Please login to merge, or discard this patch.