Completed
Push — master ( f597b6...60f62d )
by Brian
03:50 queued 03:47
created
templates/invoice/details-top.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  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
-$watermark = wpinv_watermark( $invoice->get_id() )
12
+$watermark = wpinv_watermark($invoice->get_id())
13 13
 
14 14
 ?>
15 15
 
16
-        <?php do_action( 'getpaid_before_invoice_details_top', $invoice ); ?>
16
+        <?php do_action('getpaid_before_invoice_details_top', $invoice); ?>
17 17
 
18
-        <?php if ( ! empty( $watermark ) ) : ?>
18
+        <?php if (!empty($watermark)) : ?>
19 19
 
20 20
             <div class="getpaid-watermark no-print">
21
-                <p><?php echo sanitize_text_field( $watermark ) ?></p>
21
+                <p><?php echo sanitize_text_field($watermark) ?></p>
22 22
             </div>
23 23
 
24 24
         <?php endif; ?>
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
         <div class="getpaid-invoice-details-top mt-3 mb-3">
27 27
             <div class="row">
28 28
                 <div class="col-12 col-sm-6 text-left">
29
-                    <?php do_action( 'getpaid_invoice_details_top_left', $invoice ); ?>
29
+                    <?php do_action('getpaid_invoice_details_top_left', $invoice); ?>
30 30
                 </div>
31 31
 
32 32
                 <div class="col-12 col-sm-6 text-right">
33
-                    <?php do_action( 'getpaid_invoice_details_top_right', $invoice ); ?>
33
+                    <?php do_action('getpaid_invoice_details_top_right', $invoice); ?>
34 34
                 </div>
35 35
             </div>
36 36
         </div>
37 37
 
38
-        <?php do_action( 'getpaid_after_invoice_details_top', $invoice ); ?>
38
+        <?php do_action('getpaid_after_invoice_details_top', $invoice); ?>
39 39
 
40 40
 <?php
Please login to merge, or discard this patch.
templates/invoice/company-address.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  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 12
 global $wpinv_euvat;
13 13
 
14 14
 // Prepare the company name.
15 15
 $company_name = $wpinv_euvat->get_company_name();
16 16
 
17
-if ( empty( $company_name ) ) {
17
+if (empty($company_name)) {
18 18
     $company_name = wpinv_get_business_name();
19 19
 }
20 20
 
@@ -24,28 +24,28 @@  discard block
 block discarded – undo
24 24
         <div class="row">
25 25
 
26 26
             <div class="invoice-company-address-label col-2">
27
-                <strong><?php _e( 'From:', 'invoicing' ) ?></strong>
27
+                <strong><?php _e('From:', 'invoicing') ?></strong>
28 28
             </div>
29 29
 
30 30
             <div class="invoice-company-address-value col-10">
31 31
 
32
-                <?php do_action( 'getpaid_company_address_top' ); ?>
32
+                <?php do_action('getpaid_company_address_top'); ?>
33 33
 
34 34
                 <div class="name">
35
-                    <?php echo esc_html( $from_name ); ?>
35
+                    <?php echo esc_html($from_name); ?>
36 36
                 </div>
37 37
 
38
-                <?php if ( $address = wpinv_get_business_address() ) { ?>
39
-                    <?php echo $address;?>
38
+                <?php if ($address = wpinv_get_business_address()) { ?>
39
+                    <?php echo $address; ?>
40 40
                 <?php } ?>
41 41
 
42
-                <?php if ( $email_from = wpinv_mail_get_from_address() ) { ?>
42
+                <?php if ($email_from = wpinv_mail_get_from_address()) { ?>
43 43
                     <div class="email_from">
44
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), $email_from );?>
44
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), $email_from); ?>
45 45
                     </div>
46 46
                 <?php } ?>
47 47
 
48
-                <?php do_action( 'getpaid_company_address_bottom' ); ?>
48
+                <?php do_action('getpaid_company_address_bottom'); ?>
49 49
 
50 50
             </div>
51 51
 
Please login to merge, or discard this patch.
templates/invoice/header-right-actions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,28 +7,28 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14 14
     <div class="getpaid-header-right-actions">
15 15
 
16
-        <?php if ( $invoice->is_type( 'invoice' ) ) : ?>
16
+        <?php if ($invoice->is_type('invoice')) : ?>
17 17
 
18 18
             <a class="btn btn-secondary invoice-action-print" onclick="window.print();" href="javascript:void(0)">
19
-                <?php _e( 'Print Invoice', 'invoicing' ); ?>
19
+                <?php _e('Print Invoice', 'invoicing'); ?>
20 20
             </a>
21 21
 
22
-            <?php if ( is_user_logged_in() ) : ?>
22
+            <?php if (is_user_logged_in()) : ?>
23 23
                 &nbsp;&nbsp;
24
-                <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url( wpinv_get_history_page_uri() ); ?>">
25
-                    <?php _e( 'Invoice History', 'invoicing' ); ?>
24
+                <a class="btn btn-secondary invoice-action-history" href="<?php echo esc_url(wpinv_get_history_page_uri()); ?>">
25
+                    <?php _e('Invoice History', 'invoicing'); ?>
26 26
                 </a>
27 27
             <?php endif; ?>
28 28
 
29 29
         <?php endif; ?>
30 30
 
31
-        <?php do_action('wpinv_invoice_display_right_actions', $invoice ); ?>
31
+        <?php do_action('wpinv_invoice_display_right_actions', $invoice); ?>
32 32
     </div>
33 33
 
34 34
 <?php
Please login to merge, or discard this patch.
templates/invoice/line-items.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  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 12
 ?>
13 13
 
14
-<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
14
+<?php do_action('getpaid_invoice_before_line_items', $invoice); ?>
15 15
 
16 16
     <div class="getpaid-invoice-items mt-5 mb-4 border">
17 17
 
18 18
 
19
-        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class( $invoice->get_template() ); ?>">
19
+        <div class="getpaid-invoice-items-header <?php echo sanitize_html_class($invoice->get_template()); ?>">
20 20
             <div class="form-row">
21
-                <?php foreach ( $columns as $key => $label ) : ?>
22
-                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr( $key ); ?>">
23
-                        <?php echo sanitize_text_field( $label ); ?>
21
+                <?php foreach ($columns as $key => $label) : ?>
22
+                    <div class="<?php echo 'name' == $key ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-line-item-col-<?php echo esc_attr($key); ?>">
23
+                        <?php echo sanitize_text_field($label); ?>
24 24
                     </div>
25 25
                 <?php endforeach; ?>
26 26
             </div>
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
         <?php
31 31
 
32 32
             // Display the item totals.
33
-            foreach ( $invoice->get_items() as $item ) {
34
-                wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
33
+            foreach ($invoice->get_items() as $item) {
34
+                wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns'));
35 35
             }
36 36
 
37 37
             // Display the cart totals.
38
-            wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
38
+            wpinv_get_template('invoice/line-totals.php', compact('invoice'));
39 39
 
40 40
         ?>
41 41
 
42 42
     </div>
43 43
 
44
-<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?>
45 44
\ No newline at end of file
45
+<?php do_action('getpaid_invoice_after_line_items', $invoice); ?>
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
templates/invoice/billing-address.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@  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
-$invoice     = new WPInv_Invoice( $invoice );
13
-$address_row = wpinv_get_invoice_address_markup( $invoice->get_user_info() );
12
+$invoice     = new WPInv_Invoice($invoice);
13
+$address_row = wpinv_get_invoice_address_markup($invoice->get_user_info());
14 14
 $phone       = $invoice->get_phone();
15 15
 $email       = $invoice->get_email();
16 16
 
@@ -21,36 +21,36 @@  discard block
 block discarded – undo
21 21
 
22 22
 
23 23
             <div class="invoice-billing-address-label col-2">
24
-                <strong><?php _e( 'To:', 'invoicing' ) ?></strong>
24
+                <strong><?php _e('To:', 'invoicing') ?></strong>
25 25
             </div>
26 26
 
27 27
 
28 28
             <div class="invoice-billing-address-value col-10">
29 29
 
30
-                <?php do_action( 'getpaid_billing_address_top' ); ?>
30
+                <?php do_action('getpaid_billing_address_top'); ?>
31 31
 
32
-                <?php if ( ! empty( $address_row ) ) : ?>
32
+                <?php if (!empty($address_row)) : ?>
33 33
                     <div class="billing-address">
34 34
                         <?php echo $address_row; ?>
35 35
                     </div>
36 36
                 <?php endif; ?>
37 37
 
38 38
 
39
-                <?php if ( ! empty( $phone ) ) : ?>
39
+                <?php if (!empty($phone)) : ?>
40 40
                     <div class="billing-phone">
41
-                        <?php echo wp_sprintf( __( 'Phone: %s', 'invoicing' ), esc_html( $phone ) ); ?>
41
+                        <?php echo wp_sprintf(__('Phone: %s', 'invoicing'), esc_html($phone)); ?>
42 42
                     </div>
43 43
                 <?php endif; ?>
44 44
 
45 45
 
46
-                <?php if ( ! empty( $email ) ) : ?>
46
+                <?php if (!empty($email)) : ?>
47 47
                     <div class="billing-email">
48
-                        <?php echo wp_sprintf( __( 'Email: %s', 'invoicing' ), sanitize_email( $email ) ); ?>
48
+                        <?php echo wp_sprintf(__('Email: %s', 'invoicing'), sanitize_email($email)); ?>
49 49
                     </div>
50 50
                 <?php endif; ?>
51 51
 
52 52
 
53
-                <?php do_action( 'getpaid_billing_address_bottom' ); ?>
53
+                <?php do_action('getpaid_billing_address_bottom'); ?>
54 54
 
55 55
             </div>
56 56
 
Please login to merge, or discard this patch.
templates/invoice/line-item.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -7,68 +7,68 @@
 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( 'getpaid_before_invoice_line_item', $invoice, $item );
12
+do_action('getpaid_before_invoice_line_item', $invoice, $item);
13 13
 
14 14
 ?>
15 15
 
16
-<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class( $item->get_type() ); ?>'>
16
+<div class='getpaid-invoice-item item-<?php echo (int) $item->get_id(); ?> item-type-<?php echo sanitize_html_class($item->get_type()); ?>'>
17 17
 
18 18
     <div class="form-row">
19 19
 
20
-        <?php foreach ( array_keys( $columns ) as $column ): ?>
20
+        <?php foreach (array_keys($columns) as $column): ?>
21 21
 
22
-            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class( $column ); ?>">
22
+            <div class="<?php echo 'name' == $column ? 'col-12 col-sm-6' : 'col-12 col-sm' ?> getpaid-invoice-item-<?php echo sanitize_html_class($column); ?>">
23 23
 
24 24
                 <?php
25 25
 
26 26
                     // Fires before printing a line item column.
27
-                    do_action( "getpaid_invoice_line_item_before_$column", $item, $invoice );
27
+                    do_action("getpaid_invoice_line_item_before_$column", $item, $invoice);
28 28
 
29 29
                     // Item name.
30
-                    if ( 'name' == $column ) {
30
+                    if ('name' == $column) {
31 31
 
32 32
                         // Display the name.
33
-                        echo '<div class="mb-1">' . sanitize_text_field( $item->get_name() ) . '</div>';
33
+                        echo '<div class="mb-1">' . sanitize_text_field($item->get_name()) . '</div>';
34 34
 
35 35
                         // And an optional description.
36 36
                         $description = $item->get_description();
37 37
 
38
-                        if ( ! empty( $description ) ) {
39
-                            $description = wp_kses_post( $description );
38
+                        if (!empty($description)) {
39
+                            $description = wp_kses_post($description);
40 40
                             echo "<small class='form-text text-muted pr-2 m-0'>$description</small>";
41 41
                         }
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
-                        if ( $invoice->is_recurring() && $invoice->is_renewal() ) {
50
-                            echo wpinv_price( wpinv_format_amount( $item->get_price() ), $invoice->get_currency() );
49
+                        if ($invoice->is_recurring() && $invoice->is_renewal()) {
50
+                            echo wpinv_price(wpinv_format_amount($item->get_price()), $invoice->get_currency());
51 51
                         } else {
52
-                            echo wpinv_price( wpinv_format_amount( $item->get_initial_price() ), $invoice->get_currency() );
52
+                            echo wpinv_price(wpinv_format_amount($item->get_initial_price()), $invoice->get_currency());
53 53
                         }
54 54
 
55 55
                     }
56 56
 
57 57
                     // Item quantity.
58
-                    if ( 'quantity' == $column ) {
58
+                    if ('quantity' == $column) {
59 59
                         echo (int) $item->get_qantity();
60 60
                     }
61 61
 
62 62
                     // Item sub total.
63
-                    if ( 'subtotal' == $key ) {
64
-                        echo wpinv_price( wpinv_format_amount( $item->get_sub_total() ), $invoice->get_currency() );
63
+                    if ('subtotal' == $key) {
64
+                        echo wpinv_price(wpinv_format_amount($item->get_sub_total()), $invoice->get_currency());
65 65
                     }
66 66
 
67 67
                     // Fires when printing a line item column.
68
-                    do_action( "getpaid_invoice_line_item_$column", $item, $invoice );
68
+                    do_action("getpaid_invoice_line_item_$column", $item, $invoice);
69 69
 
70 70
                     // Fires after printing a line item column.
71
-                    do_action( "getpaid_invoice_line_item_after_$column", $item, $invoice );
71
+                    do_action("getpaid_invoice_line_item_after_$column", $item, $invoice);
72 72
 
73 73
                 ?>
74 74
 
Please login to merge, or discard this patch.
templates/invoice/header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  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 12
 ?>
13 13
 
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
             <div class="row">
17 17
 
18 18
                 <div class="col-12 col-sm-6 text-left pl-0">
19
-                    <?php do_action( 'getpaid_invoice_header_left', $invoice );?>
19
+                    <?php do_action('getpaid_invoice_header_left', $invoice); ?>
20 20
                 </div>
21 21
 
22 22
                 <div class="col-12 col-sm-6 text-right pr-0">
23
-                    <?php do_action( 'getpaid_invoice_header_right', $invoice );?>
23
+                    <?php do_action('getpaid_invoice_header_right', $invoice); ?>
24 24
                 </div>
25 25
 
26 26
             </div>
Please login to merge, or discard this patch.
templates/invoice/details.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14
-        <?php do_action( 'getpaid_before_invoice_details_main', $invoice ); ?>
14
+        <?php do_action('getpaid_before_invoice_details_main', $invoice); ?>
15 15
 
16 16
         <div class="getpaid-invoice-details mt-3 mb-3">
17 17
             <div class="row">
18 18
 
19 19
                 <div class="col-12 col-sm-6">
20
-                    <?php do_action( 'getpaid_invoice_details_left', $invoice ); ?>
20
+                    <?php do_action('getpaid_invoice_details_left', $invoice); ?>
21 21
                 </div>
22 22
 
23 23
                 <div class="col-12 col-sm-6">
24
-                    <?php do_action( 'getpaid_invoice_details_right', $invoice ); ?>
24
+                    <?php do_action('getpaid_invoice_details_right', $invoice); ?>
25 25
                 </div>
26 26
 
27 27
             </div>
28 28
         </div>
29 29
 
30
-        <?php do_action( 'getpaid_after_invoice_details_main', $invoice ); ?>
30
+        <?php do_action('getpaid_after_invoice_details_main', $invoice); ?>
31 31
 
32 32
 <?php
Please login to merge, or discard this patch.
templates/invoice/header-left-actions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14 14
         <div class="getpaid-header-left-actions">
15 15
 
16
-            <?php if ( $invoice->is_type( 'invoice' ) && $invoice->needs_payment() ): ?>
17
-                <a class="btn btn-primary invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>">
18
-                    <?php _e( 'Pay For Invoice', 'invoicing' ); ?>
16
+            <?php if ($invoice->is_type('invoice') && $invoice->needs_payment()): ?>
17
+                <a class="btn btn-primary invoice-action-pay" href="<?php echo esc_url($invoice->get_checkout_payment_url()); ?>">
18
+                    <?php _e('Pay For Invoice', 'invoicing'); ?>
19 19
                 </a>
20 20
             <?php endif; ?>
21 21
 
22
-            <?php do_action('wpinv_invoice_display_left_actions', $invoice ); ?>
22
+            <?php do_action('wpinv_invoice_display_left_actions', $invoice); ?>
23 23
 
24 24
         </div>
25 25
 
Please login to merge, or discard this patch.