Passed
Push — master ( 393c0e...73f2f1 )
by Brian
10:40
created
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-sm-left pl-sm-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-sm-right pr-sm-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/line-items.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
33 33
 
34 34
             // Display the item totals.
35 35
             foreach ( $invoice->get_items() as $item ) {
36
-			wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
36
+            wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
37 37
             }
38 38
 
39 39
             // Display the fee totals.
40 40
             foreach ( $invoice->get_fees() as $fee ) {
41
-			wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
41
+            wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
42 42
             }
43 43
 
44 44
             // Display the cart totals.
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@  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
 ?>
14 14
 
15
-<?php do_action( 'getpaid_invoice_before_line_items', $invoice ); ?>
15
+<?php do_action('getpaid_invoice_before_line_items', $invoice); ?>
16 16
 
17
-    <h2 class="mt-5 mb-1 h4"><?php echo sprintf( esc_html__( '%s Items', 'invoicing' ), esc_html( ucfirst( $invoice->get_invoice_quote_type() ) ) ); ?></h2>
17
+    <h2 class="mt-5 mb-1 h4"><?php echo sprintf(esc_html__('%s Items', 'invoicing'), esc_html(ucfirst($invoice->get_invoice_quote_type()))); ?></h2>
18 18
     <div class="getpaid-invoice-items mb-4 border">
19 19
 
20 20
 
21
-        <div class="getpaid-invoice-items-header <?php echo esc_attr( $invoice->get_template() ); ?>">
21
+        <div class="getpaid-invoice-items-header <?php echo esc_attr($invoice->get_template()); ?>">
22 22
             <div class="form-row row">
23
-                <?php foreach ( $columns as $key => $label ) : ?>
24
-                    <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 ); ?>">
25
-                        <?php echo esc_html( $label ); ?>
23
+                <?php foreach ($columns as $key => $label) : ?>
24
+                    <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); ?>">
25
+                        <?php echo esc_html($label); ?>
26 26
                     </div>
27 27
                 <?php endforeach; ?>
28 28
             </div>
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
         <?php
33 33
 
34 34
             // Display the item totals.
35
-            foreach ( $invoice->get_items() as $item ) {
36
-			wpinv_get_template( 'invoice/line-item.php', compact( 'invoice', 'item', 'columns' ) );
35
+            foreach ($invoice->get_items() as $item) {
36
+			wpinv_get_template('invoice/line-item.php', compact('invoice', 'item', 'columns'));
37 37
             }
38 38
 
39 39
             // Display the fee totals.
40
-            foreach ( $invoice->get_fees() as $fee ) {
41
-			wpinv_get_template( 'invoice/fee-item.php', compact( 'invoice', 'fee', 'columns' ) );
40
+            foreach ($invoice->get_fees() as $fee) {
41
+			wpinv_get_template('invoice/fee-item.php', compact('invoice', 'fee', 'columns'));
42 42
             }
43 43
 
44 44
             // Display the cart totals.
45
-            wpinv_get_template( 'invoice/line-totals.php', compact( 'invoice' ) );
45
+            wpinv_get_template('invoice/line-totals.php', compact('invoice'));
46 46
 
47 47
         ?>
48 48
 
49 49
     </div>
50 50
 
51
-<?php do_action( 'getpaid_invoice_after_line_items', $invoice ); ?>
51
+<?php do_action('getpaid_invoice_after_line_items', $invoice); ?>
Please login to merge, or discard this patch.
templates/invoice/invoice-logo.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$logo_width  = wpinv_get_option( 'logo_width' );
13
-$logo_height = wpinv_get_option( 'logo_height' );
12
+$logo_width  = wpinv_get_option('logo_width');
13
+$logo_height = wpinv_get_option('logo_height');
14 14
 
15 15
 ?>
16
-<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url( wpinv_get_business_website() ); ?>">
16
+<a target="_blank" class="logo-link text-dark" href="<?php echo esc_url(wpinv_get_business_website()); ?>">
17 17
 
18
-    <?php if ( $logo = wpinv_get_business_logo() ) : ?>
18
+    <?php if ($logo = wpinv_get_business_logo()) : ?>
19 19
 
20
-        <?php if ( ! empty( $logo_width ) && ! empty( $logo_height ) ) : ?>
21
-            <img class="logo" style="max-width:100%; width:<?php echo absint( $logo_width ); ?>px; height:<?php echo absint( $logo_height ); ?>px;" src="<?php echo esc_url( $logo ); ?>">
20
+        <?php if (!empty($logo_width) && !empty($logo_height)) : ?>
21
+            <img class="logo" style="max-width:100%; width:<?php echo absint($logo_width); ?>px; height:<?php echo absint($logo_height); ?>px;" src="<?php echo esc_url($logo); ?>">
22 22
         <?php else : ?>
23
-            <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo ); ?>">
23
+            <img class="logo" style="max-width:100%;" src="<?php echo esc_url($logo); ?>">
24 24
         <?php endif; ?>
25 25
 
26 26
     <?php else : ?>
27
-        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() ); ?></h1>
27
+        <h1 class="h3"><?php echo esc_html(wpinv_get_business_name()); ?></h1>
28 28
     <?php endif; ?>
29 29
 
30 30
 </a>
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,12 +19,18 @@
 block discarded – undo
19 19
 
20 20
         <?php if ( ! empty( $logo_width ) && ! empty( $logo_height ) ) : ?>
21 21
             <img class="logo" style="max-width:100%; width:<?php echo absint( $logo_width ); ?>px; height:<?php echo absint( $logo_height ); ?>px;" src="<?php echo esc_url( $logo ); ?>">
22
-        <?php else : ?>
23
-            <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo ); ?>">
22
+        <?php else {
23
+    : ?>
24
+            <img class="logo" style="max-width:100%;" src="<?php echo esc_url( $logo );
25
+}
26
+?>">
24 27
         <?php endif; ?>
25 28
 
26
-    <?php else : ?>
27
-        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() ); ?></h1>
29
+    <?php else {
30
+    : ?>
31
+        <h1 class="h3"><?php echo esc_html( wpinv_get_business_name() );
32
+}
33
+?></h1>
28 34
     <?php endif; ?>
29 35
 
30 36
 </a>
Please login to merge, or discard this patch.
templates/wpinv-invalid-access.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,19 +40,19 @@
 block discarded – undo
40 40
         <?php
41 41
 
42 42
             if ( ! $invoice->exists() || $invoice->is_draft() ) {
43
-			$error = __( 'This invoice was deleted or is not visible.', 'invoicing' );
43
+            $error = __( 'This invoice was deleted or is not visible.', 'invoicing' );
44 44
             } else {
45 45
 
46
-			$user_id = get_current_user_id();
47
-			if ( wpinv_require_login_to_checkout() && empty( $user_id ) ) {
48
-				$error  = __( 'You must be logged in to view this invoice.', 'invoicing' );
49
-				$error .= sprintf(
50
-					' <a href="%s">%s</a>',
51
-					wp_login_url( $invoice->get_view_url() ),
52
-					__( 'Login.', 'invoicing' )
53
-				);
54
-			} else {
55
-				$error = __( 'This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing' );
46
+            $user_id = get_current_user_id();
47
+            if ( wpinv_require_login_to_checkout() && empty( $user_id ) ) {
48
+                $error  = __( 'You must be logged in to view this invoice.', 'invoicing' );
49
+                $error .= sprintf(
50
+                    ' <a href="%s">%s</a>',
51
+                    wp_login_url( $invoice->get_view_url() ),
52
+                    __( 'Login.', 'invoicing' )
53
+                );
54
+            } else {
55
+                $error = __( 'This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing' );
56 56
                 }
57 57
 }
58 58
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  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
 // Fetch the invoice.
13
-if ( empty( $invoice ) ) {
14
-    $invoice = new WPInv_Invoice( $GLOBALS['post'] );
13
+if (empty($invoice)) {
14
+    $invoice = new WPInv_Invoice($GLOBALS['post']);
15 15
 }
16 16
 
17 17
 ?><!DOCTYPE html>
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 
22 22
     <head>
23 23
 
24
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
24
+		<meta charset="<?php bloginfo('charset'); ?>">
25 25
         <meta name="viewport" content="width=device-width, initial-scale=1.0" >
26 26
 
27 27
         <meta name="robots" content="noindex,nofollow">
28 28
 
29 29
 		<link rel="profile" href="https://gmpg.org/xfn/11">
30 30
 
31
-        <title><?php esc_html_e( 'Invalid Access', 'invoicing' ); ?></title>
31
+        <title><?php esc_html_e('Invalid Access', 'invoicing'); ?></title>
32 32
 
33
-        <?php do_action( 'wpinv_invoice_print_head', $invoice ); ?>
33
+        <?php do_action('wpinv_invoice_print_head', $invoice); ?>
34 34
 
35 35
     </head>
36 36
 
@@ -39,20 +39,20 @@  discard block
 block discarded – undo
39 39
 
40 40
         <?php
41 41
 
42
-            if ( ! $invoice->exists() || $invoice->is_draft() ) {
43
-			$error = __( 'This invoice was deleted or is not visible.', 'invoicing' );
42
+            if (!$invoice->exists() || $invoice->is_draft()) {
43
+			$error = __('This invoice was deleted or is not visible.', 'invoicing');
44 44
             } else {
45 45
 
46 46
 			$user_id = get_current_user_id();
47
-			if ( wpinv_require_login_to_checkout() && empty( $user_id ) ) {
48
-				$error  = __( 'You must be logged in to view this invoice.', 'invoicing' );
47
+			if (wpinv_require_login_to_checkout() && empty($user_id)) {
48
+				$error  = __('You must be logged in to view this invoice.', 'invoicing');
49 49
 				$error .= sprintf(
50 50
 					' <a href="%s">%s</a>',
51
-					wp_login_url( $invoice->get_view_url() ),
52
-					__( 'Login.', 'invoicing' )
51
+					wp_login_url($invoice->get_view_url()),
52
+					__('Login.', 'invoicing')
53 53
 				);
54 54
 			} else {
55
-				$error = __( 'This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing' );
55
+				$error = __('This invoice is only viewable by clicking on the invoice link that was sent to you via email.', 'invoicing');
56 56
                 }
57 57
 }
58 58
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 
61 61
         <div class="container">
62 62
             <div class="alert alert-danger m-5" role="alert">
63
-                <h4 class="alert-heading"><?php esc_html_e( 'Access Denied', 'invoicing' ); ?></h4>
64
-                <p><?php echo wp_kses_post( $error ); ?></p>
63
+                <h4 class="alert-heading"><?php esc_html_e('Access Denied', 'invoicing'); ?></h4>
64
+                <p><?php echo wp_kses_post($error); ?></p>
65 65
             </div>
66 66
         </div>
67 67
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/separator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 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
 <hr class="featurette-divider" />
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/heading.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 ?>
14 14
 <component :is='form_element.level' v-html='form_element.text'></component>
Please login to merge, or discard this patch.
templates/payment-forms/elements/file_upload.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,20 +21,20 @@
 block discarded – undo
21 21
 
22 22
 foreach ( $file_types as $file_type ) {
23 23
 
24
-	if ( isset( $all_types[ $file_type ] ) ) {
25
-		$types[]   = $all_types[ $file_type ];
26
-		$file_type = explode( '|', $file_type );
27
-
28
-		foreach ( $file_type as $type ) {
29
-			$type     = trim( $type );
30
-			$types[]  = ".$type";
31
-			$_types[] = $type;
32
-		}
24
+    if ( isset( $all_types[ $file_type ] ) ) {
25
+        $types[]   = $all_types[ $file_type ];
26
+        $file_type = explode( '|', $file_type );
27
+
28
+        foreach ( $file_type as $type ) {
29
+            $type     = trim( $type );
30
+            $types[]  = ".$type";
31
+            $_types[] = $type;
32
+        }
33 33
 }
34 34
 }
35 35
 
36 36
 if ( ! empty( $required ) ) {
37
-	$label .= "<span class='text-danger'> *</span>";
37
+    $label .= "<span class='text-danger'> *</span>";
38 38
 }
39 39
 
40 40
 ?>
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -7,33 +7,33 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
11
-
12
-$label        = empty( $label ) ? '' : wp_kses_post( $label );
13
-$label_class  = sanitize_key( preg_replace( '/[^A-Za-z0-9_-]/', '-', $label ) );
14
-$id           = esc_attr( $id );
15
-$_id          = $id . uniqid( '_' );
16
-$max_file_num = empty( $max_file_num ) ? 1 : absint( $max_file_num );
17
-$file_types   = empty( $file_types ) ? array( 'jpg|jpeg|jpe', 'gif', 'png' ) : $file_types;
10
+defined('ABSPATH') || exit;
11
+
12
+$label        = empty($label) ? '' : wp_kses_post($label);
13
+$label_class  = sanitize_key(preg_replace('/[^A-Za-z0-9_-]/', '-', $label));
14
+$id           = esc_attr($id);
15
+$_id          = $id . uniqid('_');
16
+$max_file_num = empty($max_file_num) ? 1 : absint($max_file_num);
17
+$file_types   = empty($file_types) ? array('jpg|jpeg|jpe', 'gif', 'png') : $file_types;
18 18
 $all_types    = getpaid_get_allowed_mime_types();
19 19
 $types        = array();
20 20
 $_types       = array();
21 21
 
22
-foreach ( $file_types as $file_type ) {
22
+foreach ($file_types as $file_type) {
23 23
 
24
-	if ( isset( $all_types[ $file_type ] ) ) {
25
-		$types[]   = $all_types[ $file_type ];
26
-		$file_type = explode( '|', $file_type );
24
+	if (isset($all_types[$file_type])) {
25
+		$types[]   = $all_types[$file_type];
26
+		$file_type = explode('|', $file_type);
27 27
 
28
-		foreach ( $file_type as $type ) {
29
-			$type     = trim( $type );
28
+		foreach ($file_type as $type) {
29
+			$type     = trim($type);
30 30
 			$types[]  = ".$type";
31 31
 			$_types[] = $type;
32 32
 		}
33 33
 }
34 34
 }
35 35
 
36
-if ( ! empty( $required ) ) {
36
+if (!empty($required)) {
37 37
 	$label .= "<span class='text-danger'> *</span>";
38 38
 }
39 39
 
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
 
42 42
 <label><span v-html="form_element.label"></span></label>
43 43
 
44
-<div class="form-group mb-3 <?php echo esc_attr( $label_class ); ?>" data-name="<?php echo esc_attr( $id ); ?>" data-max="<?php echo esc_attr( $max_file_num ); ?>">
45
-	<label for="<?php echo esc_attr( $id ); ?>"><?php echo wp_kses_post( $label ); ?></label>
46
-	<input type="file" class="sr-only getpaid-files-input" id="<?php echo esc_attr( $id ); ?>" accept="<?php echo esc_attr( implode( ', ', $types ) ); ?>" data-extensions="<?php echo esc_attr( wp_json_encode( $_types ) ); ?>" <?php echo $max_file_num == 1 ? '' : 'multiple="multiple"'; ?>>
44
+<div class="form-group mb-3 <?php echo esc_attr($label_class); ?>" data-name="<?php echo esc_attr($id); ?>" data-max="<?php echo esc_attr($max_file_num); ?>">
45
+	<label for="<?php echo esc_attr($id); ?>"><?php echo wp_kses_post($label); ?></label>
46
+	<input type="file" class="sr-only getpaid-files-input" id="<?php echo esc_attr($id); ?>" accept="<?php echo esc_attr(implode(', ', $types)); ?>" data-extensions="<?php echo esc_attr(wp_json_encode($_types)); ?>" <?php echo $max_file_num == 1 ? '' : 'multiple="multiple"'; ?>>
47 47
 
48
-	<label for="<?php echo esc_attr( $id ); ?>" class="getpaid-file-upload-element d-flex w-100 flex-column align-items-center justify-content-center p-2 mb-2">
48
+	<label for="<?php echo esc_attr($id); ?>" class="getpaid-file-upload-element d-flex w-100 flex-column align-items-center justify-content-center p-2 mb-2">
49 49
 		<div class="h5 text-dark">
50
-			<?php echo esc_html( _n( 'Drag your file to this area or click to upload', 'Drag files to this area or click to upload', $max_file_num, 'invoicing' ) ); ?>
50
+			<?php echo esc_html(_n('Drag your file to this area or click to upload', 'Drag files to this area or click to upload', $max_file_num, 'invoicing')); ?>
51 51
 		</div>
52
-		<?php if ( ! empty( $description ) ) : ?>
53
-			<small class="form-text text-muted"><?php echo wp_kses_post( $description ); ?></small>
52
+		<?php if (!empty($description)) : ?>
53
+			<small class="form-text text-muted"><?php echo wp_kses_post($description); ?></small>
54 54
 		<?php endif; ?>
55 55
 	</label>
56 56
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	<div class="form-row row mb-3 d-none getpaid-progress-template">
60 60
 
61 61
 		<div class="overflow-hidden text-nowrap col-7 col-sm-4">
62
-			<a href="" class="close float-none" title="<?php esc_attr_e( 'Remove File', 'invoicing' ); ?>">&times;<span class="sr-only"><?php esc_html_e( 'Close', 'invoicing' ); ?></span></a>&nbsp;
62
+			<a href="" class="close float-none" title="<?php esc_attr_e('Remove File', 'invoicing'); ?>">&times;<span class="sr-only"><?php esc_html_e('Close', 'invoicing'); ?></span></a>&nbsp;
63 63
 			<i class="fa fa-file" aria-hidden="true"></i>&nbsp; <span class="getpaid-progress-file-name"></span>&nbsp;
64 64
 		</div>
65 65
 
Please login to merge, or discard this patch.
templates/payment-forms/elements/items.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,44 +7,44 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( empty( $form->get_items() ) ) {
12
+if (empty($form->get_items())) {
13 13
     return;
14 14
 }
15 15
 
16
-if ( ! empty( $GLOBALS['getpaid_force_checkbox'] ) ) {
16
+if (!empty($GLOBALS['getpaid_force_checkbox'])) {
17 17
     $items_type = 'checkbox';
18 18
 }
19 19
 
20
-if ( empty( $items_type ) ) {
20
+if (empty($items_type)) {
21 21
     $items_type = 'total';
22 22
 }
23 23
 
24
-do_action( 'getpaid_before_payment_form_items', $form );
24
+do_action('getpaid_before_payment_form_items', $form);
25 25
 
26
-switch ( $items_type ) {
26
+switch ($items_type) {
27 27
     case 'radio':
28
-        wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) );
28
+        wpinv_get_template('payment-forms/variations/radio.php', compact('form', 'items_type'));
29 29
         break;
30 30
     case 'checkbox':
31
-        wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) );
31
+        wpinv_get_template('payment-forms/variations/checkbox.php', compact('form', 'items_type'));
32 32
         break;
33 33
     case 'select':
34
-        wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) );
34
+        wpinv_get_template('payment-forms/variations/select.php', compact('form', 'items_type'));
35 35
         break;
36 36
 }
37 37
 
38
-do_action( 'getpaid_before_payment_form_cart', $form );
38
+do_action('getpaid_before_payment_form_cart', $form);
39 39
 
40 40
 // Display the cart totals.
41
-if ( ! empty( $hide_cart ) ) {
41
+if (!empty($hide_cart)) {
42 42
     echo '<div class="d-none">';
43 43
 }
44 44
 
45 45
 // Display the cart totals.
46
-wpinv_get_template( 'payment-forms/cart.php', compact( 'form', 'items_type' ) );
46
+wpinv_get_template('payment-forms/cart.php', compact('form', 'items_type'));
47 47
 
48
-if ( ! empty( $hide_cart ) ) {
48
+if (!empty($hide_cart)) {
49 49
     echo '</div>';
50 50
 }
Please login to merge, or discard this patch.
templates/payment-forms/cart.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
             // Display the item totals.
46 46
             foreach ( $form->get_items() as $item ) {
47
-			wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
47
+            wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
48 48
             }
49 49
 
50 50
             // Display the cart totals.
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,34 +7,34 @@  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
 // Cart table columns.
13 13
 $columns = array(
14
-    'name'     => __( 'Item', 'invoicing' ),
15
-    'price'    => __( 'Price', 'invoicing' ),
16
-    'quantity' => __( 'Qty', 'invoicing' ),
17
-    'subtotal' => __( 'Subtotal', 'invoicing' ),
14
+    'name'     => __('Item', 'invoicing'),
15
+    'price'    => __('Price', 'invoicing'),
16
+    'quantity' => __('Qty', 'invoicing'),
17
+    'subtotal' => __('Subtotal', 'invoicing'),
18 18
 );
19 19
 
20
-if ( ! empty( $form->invoice ) ) {
21
-    $columns = getpaid_invoice_item_columns( $form->invoice );
20
+if (!empty($form->invoice)) {
21
+    $columns = getpaid_invoice_item_columns($form->invoice);
22 22
 }
23 23
 
24
-if ( isset( $columns['tax_rate'] ) ) {
25
-    unset( $columns['tax_rate'] );
24
+if (isset($columns['tax_rate'])) {
25
+    unset($columns['tax_rate']);
26 26
 }
27 27
 
28
-$columns = apply_filters( 'getpaid_payment_form_cart_table_columns', $columns, $form );
28
+$columns = apply_filters('getpaid_payment_form_cart_table_columns', $columns, $form);
29 29
 
30 30
 ?>
31 31
     <div class="getpaid-payment-form-items-cart border form-group mb-3">
32 32
 
33 33
         <div class="getpaid-payment-form-items-cart-header font-weight-bold bg-light border-bottom py-2 px-3">
34 34
             <div class="form-row row">
35
-                <?php foreach ( $columns as $key => $label ) : ?>
36
-                    <div class="<?php echo 'name' == $key ? 'col-6' : 'col'; ?> <?php echo ( in_array( $key, array( 'subtotal', 'quantity', 'tax_rate' ) ) ) ? 'd-none d-sm-block' : ''; ?> getpaid-form-cart-item-<?php echo esc_attr( $key ); ?>">
37
-                        <span><?php echo esc_html( $label ); ?></span>
35
+                <?php foreach ($columns as $key => $label) : ?>
36
+                    <div class="<?php echo 'name' == $key ? 'col-6' : 'col'; ?> <?php echo (in_array($key, array('subtotal', 'quantity', 'tax_rate'))) ? 'd-none d-sm-block' : ''; ?> getpaid-form-cart-item-<?php echo esc_attr($key); ?>">
37
+                        <span><?php echo esc_html($label); ?></span>
38 38
                     </div>
39 39
                 <?php endforeach; ?>
40 40
             </div>
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         <?php
44 44
 
45 45
             // Display the item totals.
46
-            foreach ( $form->get_items() as $item ) {
47
-			wpinv_get_template( 'payment-forms/cart-item.php', compact( 'form', 'item', 'columns' ) );
46
+            foreach ($form->get_items() as $item) {
47
+			wpinv_get_template('payment-forms/cart-item.php', compact('form', 'item', 'columns'));
48 48
             }
49 49
 
50 50
             // Display the cart totals.
51
-            wpinv_get_template( 'payment-forms/cart-totals.php', compact( 'form' ) );
51
+            wpinv_get_template('payment-forms/cart-totals.php', compact('form'));
52 52
 
53 53
         ?>
54 54
     </div>
55 55
 
56 56
 <?php
57 57
 
58
-do_action( 'getpaid_after_payment_form_cart', $form );
58
+do_action('getpaid_after_payment_form_cart', $form);
Please login to merge, or discard this patch.