Passed
Pull Request — master (#462)
by Viktor
04:15
created
templates/payment-forms/elements/paragraph.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-$text = isset( $element['text'] ) ? trim( $element['text'] ) : '';
12
+$text = isset($element['text']) ? trim($element['text']) : '';
13 13
 
14
-if ( ! empty( $text ) ) {
14
+if (!empty($text)) {
15 15
     echo "<p>$text</p>";
16 16
 }
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-payment-form-info.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit; // Exit if accessed directly
11
+    exit; // Exit if accessed directly
12 12
 }
13 13
 
14 14
 /**
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 class GetPaid_Meta_Box_Payment_Form_Info {
18 18
 
19 19
     /**
20
-	 * Output the metabox.
21
-	 *
22
-	 * @param WP_Post $post
23
-	 */
20
+     * Output the metabox.
21
+     *
22
+     * @param WP_Post $post
23
+     */
24 24
     public static function output( $post ) {
25 25
 
26 26
         // Prepare the form.
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,43 +21,43 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the form.
27
-        $form = new GetPaid_Payment_Form( $post );
27
+        $form = new GetPaid_Payment_Form($post);
28 28
 
29 29
         ?>
30 30
 
31 31
         <div class='bsui' style='padding-top: 10px;'>
32
-            <?php do_action( 'wpinv_payment_form_before_info_metabox', $form ); ?>
32
+            <?php do_action('wpinv_payment_form_before_info_metabox', $form); ?>
33 33
 
34 34
             <div class="wpinv_payment_form_shortcode form-group row">
35 35
                 <label for="wpinv_payment_form_shortcode" class="col-sm-12 col-form-label">
36
-                    <?php _e( 'Payment Form Shortcode', 'invoicing' );?>
37
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a payment form', 'invoicing' ); ?>"></span>
36
+                    <?php _e('Payment Form Shortcode', 'invoicing'); ?>
37
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a payment form', 'invoicing'); ?>"></span>
38 38
                 </label>
39 39
 
40 40
                 <div class="col-sm-12">
41
-                    <input  onClick="this.select()" type="text" id="wpinv_payment_form_shortcode" value="[getpaid form=<?php echo esc_attr( $form->get_id() ); ?>]" style="width: 100%;" />
41
+                    <input  onClick="this.select()" type="text" id="wpinv_payment_form_shortcode" value="[getpaid form=<?php echo esc_attr($form->get_id()); ?>]" style="width: 100%;" />
42 42
                 </div>
43 43
             </div>
44 44
 
45 45
             <div class="wpinv_payment_form_buy_shortcode form-group row">
46 46
                 <label for="wpinv_payment_form_buy_shortcode" class="col-sm-12 col-form-label">
47
-                    <?php _e( 'Payment Button Shortcode', 'invoicing' );?>
48
-                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e( 'Displays a buy now button', 'invoicing' ); ?>"></span>
47
+                    <?php _e('Payment Button Shortcode', 'invoicing'); ?>
48
+                    <span class="wpi-help-tip dashicons dashicons-editor-help" title="<?php esc_attr_e('Displays a buy now button', 'invoicing'); ?>"></span>
49 49
                 </label>
50 50
 
51 51
                 <div class="col-sm-12">
52
-                    <input onClick="this.select()" type="text" id="wpinv_payment_form_buy_shortcode" value="[getpaid form=<?php echo esc_attr( $form->get_id() ); ?> button='Buy Now']" style="width: 100%;" />
52
+                    <input onClick="this.select()" type="text" id="wpinv_payment_form_buy_shortcode" value="[getpaid form=<?php echo esc_attr($form->get_id()); ?> button='Buy Now']" style="width: 100%;" />
53 53
                     <small class="form-text text-muted">
54
-                        <?php _e( 'Or use the following URL in a link:', 'invoicing' );?>
55
-                        <code>#getpaid-form-<?php echo intval( $form->get_id() ); ?></code>
54
+                        <?php _e('Or use the following URL in a link:', 'invoicing'); ?>
55
+                        <code>#getpaid-form-<?php echo intval($form->get_id()); ?></code>
56 56
                     </small>
57 57
                 </div>
58 58
             </div>
59 59
 
60
-            <?php do_action( 'wpinv_payment_form_info_metabox', $form ); ?>
60
+            <?php do_action('wpinv_payment_form_info_metabox', $form); ?>
61 61
         </div>
62 62
         <?php
63 63
 
Please login to merge, or discard this patch.
includes/data/default-payment-form.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 return array(
14 14
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
         'placeholder' => '[email protected]',
18 18
         'value'       => '',
19
-        'label'       => __( 'Billing Email', 'invoicing' ),
19
+        'label'       => __('Billing Email', 'invoicing'),
20 20
         'description' => '',
21 21
         'required'    => true,
22 22
         'id'          => 'mmdwqzpox',
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             array(
35 35
                 'placeholder'  => 'Jon',
36 36
                 'value'        => '',
37
-                'label'        => __( 'First Name', 'invoicing' ),
37
+                'label'        => __('First Name', 'invoicing'),
38 38
                 'description'  => '',
39 39
                 'required'     => false,
40 40
                 'visible'      => true,
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             array(
45 45
                 'placeholder'  => 'Snow',
46 46
                 'value'        => '',
47
-                'label'        => __( 'Last Name', 'invoicing' ),
47
+                'label'        => __('Last Name', 'invoicing'),
48 48
                 'description'  => '',
49 49
                 'required'     => false,
50 50
                 'visible'      => true,
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             array(
55 55
                 'placeholder'  => '',
56 56
                 'value'        => '',
57
-                'label'        => __( 'Address', 'invoicing' ),
57
+                'label'        => __('Address', 'invoicing'),
58 58
                 'description'  => '',
59 59
                 'required'     => false,
60 60
                 'visible'      => true,
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             array(
65 65
                 'placeholder'  => '',
66 66
                 'value'        => '',
67
-                'label'        => __( 'City', 'invoicing' ),
67
+                'label'        => __('City', 'invoicing'),
68 68
                 'description'  => '',
69 69
                 'required'     => false,
70 70
                 'visible'      => true,
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
             ),
73 73
 
74 74
             array(
75
-                'placeholder'  => __( 'Select your country' ),
75
+                'placeholder'  => __('Select your country'),
76 76
                 'value'        => '',
77
-                'label'        => __( 'Country', 'invoicing' ),
77
+                'label'        => __('Country', 'invoicing'),
78 78
                 'description'  => '',
79 79
                 'required'     => false,
80 80
                 'visible'      => true,
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
             ),
83 83
 
84 84
             array(
85
-                'placeholder'  => __( 'Choose a state', 'invoicing' ),
85
+                'placeholder'  => __('Choose a state', 'invoicing'),
86 86
                 'value'        => '',
87
-                'label'        => __( 'State / Province', 'invoicing' ),
87
+                'label'        => __('State / Province', 'invoicing'),
88 88
                 'description'  => '',
89 89
                 'required'     => false,
90 90
                 'visible'      => true,
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             array(
95 95
                 'placeholder'  => '',
96 96
                 'value'        => '',
97
-                'label'        => __( 'ZIP / Postcode', 'invoicing' ),
97
+                'label'        => __('ZIP / Postcode', 'invoicing'),
98 98
                 'description'  => '',
99 99
                 'required'     => false,
100 100
                 'visible'      => true,
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             array(
105 105
                 'placeholder'  => '',
106 106
                 'value'        => '',
107
-                'label'        => __( 'Phone', 'invoicing' ),
107
+                'label'        => __('Phone', 'invoicing'),
108 108
                 'description'  => '',
109 109
                 'required'     => false,
110 110
                 'visible'      => true,
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             array(
115 115
                 'placeholder'  => '',
116 116
                 'value'        => '',
117
-                'label'        => __( 'Company', 'invoicing' ),
117
+                'label'        => __('Company', 'invoicing'),
118 118
                 'description'  => '',
119 119
                 'required'     => false,
120 120
                 'visible'      => false,
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             array(
125 125
                 'placeholder'  => '',
126 126
                 'value'        => '',
127
-                'label'        => __( 'VAT Number', 'invoicing' ),
127
+                'label'        => __('VAT Number', 'invoicing'),
128 128
                 'description'  => '',
129 129
                 'required'     => false,
130 130
                 'visible'      => false,
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     ),
147 147
 
148 148
     array(
149
-        'text'    => __( 'Select Payment Method', 'invoicing' ),
149
+        'text'    => __('Select Payment Method', 'invoicing'),
150 150
         'id'          => 'gtscicd',
151 151
         'name'        => 'gtscicd',
152 152
         'type'        => 'gateway_select',
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 
159 159
         'value'       =>'',
160 160
         'class'       => 'btn-primary',
161
-        'label'       => __( 'Pay Now »', 'invoicing' ),
162
-        'description' => __( 'By continuing with your payment, you are agreeing to our privacy policy and terms of service.', 'invoicing' ),
161
+        'label'       => __('Pay Now »', 'invoicing'),
162
+        'description' => __('By continuing with your payment, you are agreeing to our privacy policy and terms of service.', 'invoicing'),
163 163
         'id'          => 'rtqljyy',
164 164
         'name'        => 'rtqljyy',
165 165
         'type'        => 'pay_button',
Please login to merge, or discard this patch.
includes/data/sample-payment-form.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @version 1.0.19
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 return array(
14 14
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
         'placeholder' => '[email protected]',
18 18
         'value'       => '',
19
-        'label'       => __( 'Billing Email', 'invoicing' ),
19
+        'label'       => __('Billing Email', 'invoicing'),
20 20
         'description' => '',
21 21
         'required'    => true,
22 22
         'id'          => 'mmdwqzpox',
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     ),
39 39
 
40 40
     array(
41
-        'text'    => __( 'Select Payment Method', 'invoicing' ),
41
+        'text'    => __('Select Payment Method', 'invoicing'),
42 42
         'id'          => 'gtscicd',
43 43
         'name'        => 'gtscicd',
44 44
         'type'        => 'gateway_select',
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 
51 51
         'value'       =>'',
52 52
         'class'       => 'btn-primary',
53
-        'label'       => __( 'Pay Now »', 'invoicing' ),
54
-        'description' => __( 'By continuing with your payment, you are agreeing to our privacy policy and terms of service.', 'invoicing' ),
53
+        'label'       => __('Pay Now »', 'invoicing'),
54
+        'description' => __('By continuing with your payment, you are agreeing to our privacy policy and terms of service.', 'invoicing'),
55 55
         'id'          => 'rtqljyy',
56 56
         'name'        => 'rtqljyy',
57 57
         'type'        => 'pay_button',
Please login to merge, or discard this patch.
templates/payment-forms/variations/radio.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  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
 // Prepare the selectable items.
13 13
 $selectable = array();
14
-foreach ( $form->get_items() as $item ) {
15
-    if ( ! $item->is_required ) {
16
-        $selectable[$item->get_id()] = $item->get_name() . ' &mdash; ' . wpinv_price( wpinv_format_amount( $item->get_initial_price() ) );
14
+foreach ($form->get_items() as $item) {
15
+    if (!$item->is_required) {
16
+        $selectable[$item->get_id()] = $item->get_name() . ' &mdash; ' . wpinv_price(wpinv_format_amount($item->get_initial_price()));
17 17
     }
18 18
 }
19 19
 
20
-if ( empty( $selectable ) ) {
20
+if (empty($selectable)) {
21 21
     return;
22 22
 }
23 23
 
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 echo aui()->radio(
28 28
     array(
29 29
         'name'       => 'getpaid-payment-form-selected-item',
30
-        'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ),
30
+        'id'         => 'getpaid-payment-form-selected-item' . uniqid('_'),
31 31
         'required'   => true,
32
-        'label'      => __( 'Select Item', 'invoicing' ),
32
+        'label'      => __('Select Item', 'invoicing'),
33 33
         'label_type' => 'vertical',
34 34
         'inline'     => false,
35 35
         'options'    => $selectable,
Please login to merge, or discard this patch.
templates/payment-forms/variations/checkbox.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,29 +7,29 @@
 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
 // Prepare the selectable items.
13 13
 $selectable = array();
14
-foreach ( $form->get_items() as $item ) {
15
-    if ( ! $item->is_required ) {
16
-        $selectable[$item->get_id()] = $item->get_name() . ' &mdash; ' . wpinv_price( wpinv_format_amount( $item->get_initial_price() ) );
14
+foreach ($form->get_items() as $item) {
15
+    if (!$item->is_required) {
16
+        $selectable[$item->get_id()] = $item->get_name() . ' &mdash; ' . wpinv_price(wpinv_format_amount($item->get_initial_price()));
17 17
     }
18 18
 }
19 19
 
20
-if ( empty( $selectable ) ) {
20
+if (empty($selectable)) {
21 21
     return;
22 22
 }
23 23
 
24 24
 echo '<div class="getpaid-payment-form-items-checkbox form-group">';
25 25
 
26
-foreach ( $selectable as $item_id => $item_name ) {
26
+foreach ($selectable as $item_id => $item_name) {
27 27
 
28 28
     echo aui()->input(
29 29
         array(
30 30
             'type'       => 'checkbox',
31 31
             'name'       => 'getpaid-payment-form-selected-item',
32
-            'id'         => 'getpaid-payment-form-selected-item' . uniqid( '_' ) . $item_id,
32
+            'id'         => 'getpaid-payment-form-selected-item' . uniqid('_') . $item_id,
33 33
             'label'      => $item_name,
34 34
             'value'      => $item_id,
35 35
             'no_wrap'    => true,
Please login to merge, or discard this patch.
templates/payment-forms/elements/items.php 2 patches
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
 }
19 19
 
20 20
 switch( $items_type ) {
21
-    case 'radio':
22
-        wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) );
23
-        break;
24
-    case 'checkbox':
25
-        wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) );
26
-        break;
27
-    case 'select':
28
-        wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) );
29
-        break;
21
+        case 'radio':
22
+            wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) );
23
+            break;
24
+        case 'checkbox':
25
+            wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) );
26
+            break;
27
+        case 'select':
28
+            wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) );
29
+            break;
30 30
 }
31 31
 
32 32
 // Display the cart totals.
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,36 +7,36 @@
 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( $items_type ) ) {
16
+if (empty($items_type)) {
17 17
     $items_type = 'total';
18 18
 }
19 19
 
20
-switch( $items_type ) {
20
+switch ($items_type) {
21 21
     case 'radio':
22
-        wpinv_get_template( 'payment-forms/variations/radio.php', compact( 'form', 'items_type' ) );
22
+        wpinv_get_template('payment-forms/variations/radio.php', compact('form', 'items_type'));
23 23
         break;
24 24
     case 'checkbox':
25
-        wpinv_get_template( 'payment-forms/variations/checkbox.php', compact( 'form', 'items_type' ) );
25
+        wpinv_get_template('payment-forms/variations/checkbox.php', compact('form', 'items_type'));
26 26
         break;
27 27
     case 'select':
28
-        wpinv_get_template( 'payment-forms/variations/select.php', compact( 'form', 'items_type' ) );
28
+        wpinv_get_template('payment-forms/variations/select.php', compact('form', 'items_type'));
29 29
         break;
30 30
 }
31 31
 
32 32
 // Display the cart totals.
33
-if ( ! empty( $hide_cart ) ) {
33
+if (!empty($hide_cart)) {
34 34
     echo '<div class="d-none">';
35 35
 }
36 36
 
37 37
 // Display the cart totals.
38
-wpinv_get_template( 'payment-forms/cart.php', compact( 'form', 'items_type' ) );
38
+wpinv_get_template('payment-forms/cart.php', compact('form', 'items_type'));
39 39
 
40
-if ( ! empty( $hide_cart ) ) {
40
+if (!empty($hide_cart)) {
41 41
     echo '</div>';
42 42
 }
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-items.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit; // Exit if accessed directly
11
+    exit; // Exit if accessed directly
12 12
 }
13 13
 
14 14
 /**
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 class GetPaid_Meta_Box_Invoice_Items {
18 18
 
19 19
     /**
20
-	 * Output the metabox.
21
-	 *
22
-	 * @param WP_Post $post
23
-	 */
20
+     * Output the metabox.
21
+     *
22
+     * @param WP_Post $post
23
+     */
24 24
     public static function output( $post ) {
25 25
 
26 26
         // Prepare the invoice.
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,51 +21,51 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the invoice.
27
-        $invoice = new WPInv_Invoice( $post );
27
+        $invoice = new WPInv_Invoice($post);
28 28
 
29 29
         // Invoice items.
30 30
         $items = $invoice->get_items();
31 31
 
32 32
         // New item url.
33
-        $new_item = admin_url( 'post-new.php?post_type=wpi_item' );
33
+        $new_item = admin_url('post-new.php?post_type=wpi_item');
34 34
 
35 35
         // Totals.
36
-        $total = wpinv_price( wpinv_format_amount( $invoice->get_total() ), $invoice->get_currency() );
36
+        $total = wpinv_price(wpinv_format_amount($invoice->get_total()), $invoice->get_currency());
37 37
 
38
-        if ( $invoice->is_recurring() && $invoice->is_parent() && $invoice->get_total() != $invoice->get_recurring_total() ) {
39
-            $recurring_total = wpinv_price( wpinv_format_amount( $invoice->get_recurring_total() ), $invoice->get_currency() );
40
-            $total          .= '<small class="form-text text-muted">' . sprintf( __( 'Recurring Price: %s', 'invoicing' ), $recurring_total ) . '</small>';
38
+        if ($invoice->is_recurring() && $invoice->is_parent() && $invoice->get_total() != $invoice->get_recurring_total()) {
39
+            $recurring_total = wpinv_price(wpinv_format_amount($invoice->get_recurring_total()), $invoice->get_currency());
40
+            $total          .= '<small class="form-text text-muted">' . sprintf(__('Recurring Price: %s', 'invoicing'), $recurring_total) . '</small>';
41 41
         }
42 42
 
43 43
         $totals = array(
44 44
 
45 45
             'subtotal'  => array(
46
-                'label' => __( 'Items Subtotal', 'invoicing' ),
47
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_subtotal() ), $invoice->get_currency() ),
46
+                'label' => __('Items Subtotal', 'invoicing'),
47
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_subtotal()), $invoice->get_currency()),
48 48
             ),
49 49
 
50 50
             'discount'  => array(
51
-                'label' => __( 'Total Discount', 'invoicing' ),
52
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_total_discount() ), $invoice->get_currency() ),
51
+                'label' => __('Total Discount', 'invoicing'),
52
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_total_discount()), $invoice->get_currency()),
53 53
             ),
54 54
 
55 55
             'tax'       => array(
56
-                'label' => __( 'Total Tax', 'invoicing' ),
57
-                'value' => wpinv_price( wpinv_format_amount( $invoice->get_total_tax() ), $invoice->get_currency() ),
56
+                'label' => __('Total Tax', 'invoicing'),
57
+                'value' => wpinv_price(wpinv_format_amount($invoice->get_total_tax()), $invoice->get_currency()),
58 58
             ),
59 59
 
60 60
             'total'     => array(
61
-                'label' => __( 'Invoice Total', 'invoicing' ),
61
+                'label' => __('Invoice Total', 'invoicing'),
62 62
                 'value' => $total,
63 63
             )
64 64
         );
65 65
 
66 66
 
67
-        if ( ! wpinv_use_taxes() ) {
68
-            unset( $totals['tax'] );
67
+        if (!wpinv_use_taxes()) {
68
+            unset($totals['tax']);
69 69
         }
70 70
         ?>
71 71
 
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
             }
82 82
         </style>
83 83
 
84
-                <div class="bsui getpaid-invoice-items-inner <?php echo sanitize_html_class( $invoice->get_template( 'edit' ) ); ?> <?php echo empty( $items ) ? 'no-items' : 'has-items'; ?> <?php echo $invoice->is_paid() || $invoice->is_refunded() ? 'not-editable' : 'editable'; ?>" style="margin-top: 1.5rem">
84
+                <div class="bsui getpaid-invoice-items-inner <?php echo sanitize_html_class($invoice->get_template('edit')); ?> <?php echo empty($items) ? 'no-items' : 'has-items'; ?> <?php echo $invoice->is_paid() || $invoice->is_refunded() ? 'not-editable' : 'editable'; ?>" style="margin-top: 1.5rem">
85 85
 
86
-                    <?php if ( ! $invoice->is_paid() && ! $invoice->is_refunded() ) : ?>
87
-                        <?php do_action( 'wpinv_meta_box_before_invoice_template_row', $invoice->get_id() ); ?>
86
+                    <?php if (!$invoice->is_paid() && !$invoice->is_refunded()) : ?>
87
+                        <?php do_action('wpinv_meta_box_before_invoice_template_row', $invoice->get_id()); ?>
88 88
 
89 89
                         <div class="row">
90 90
                             <div class="col-12 col-sm-6">
@@ -93,15 +93,15 @@  discard block
 block discarded – undo
93 93
                                         array(
94 94
                                             'id'          => 'wpinv_template',
95 95
                                             'name'        => 'wpinv_template',
96
-                                            'label'       => __( 'Template', 'invoicing' ),
96
+                                            'label'       => __('Template', 'invoicing'),
97 97
                                             'label_type'  => 'vertical',
98
-                                            'placeholder' => __( 'Choose a template', 'invoicing' ),
98
+                                            'placeholder' => __('Choose a template', 'invoicing'),
99 99
                                             'class'       => 'form-control-sm',
100
-                                            'value'       => $invoice->get_template( 'edit' ),
100
+                                            'value'       => $invoice->get_template('edit'),
101 101
                                             'options'     => array(
102
-                                                'quantity' => __( 'Quantity', 'invoicing' ),
103
-                                                'hours'    => __( 'Hours', 'invoicing' ),
104
-                                                'amount'   => __( 'Amount Only', 'invoicing' ),
102
+                                                'quantity' => __('Quantity', 'invoicing'),
103
+                                                'hours'    => __('Hours', 'invoicing'),
104
+                                                'amount'   => __('Amount Only', 'invoicing'),
105 105
                                             ),
106 106
                                             'data-allow-clear' => 'false',
107 107
                                             'select2'          => true,
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
                                         array(
118 118
                                             'id'          => 'wpinv_currency',
119 119
                                             'name'        => 'wpinv_currency',
120
-                                            'label'       => __( 'Currency', 'invoicing' ),
120
+                                            'label'       => __('Currency', 'invoicing'),
121 121
                                             'label_type'  => 'vertical',
122
-                                            'placeholder' => __( 'Select Invoice Currency', 'invoicing' ),
122
+                                            'placeholder' => __('Select Invoice Currency', 'invoicing'),
123 123
                                             'class'       => 'form-control-sm',
124
-                                            'value'       => $invoice->get_currency( 'edit' ),
124
+                                            'value'       => $invoice->get_currency('edit'),
125 125
                                             'required'    => false,
126 126
                                             'data-allow-clear' => 'false',
127 127
                                             'select2'          => true,
@@ -133,24 +133,24 @@  discard block
 block discarded – undo
133 133
                             </div>
134 134
                         </div>
135 135
 
136
-                        <?php do_action( 'wpinv_meta_box_invoice_template_row', $invoice->get_id() ); ?>
136
+                        <?php do_action('wpinv_meta_box_invoice_template_row', $invoice->get_id()); ?>
137 137
                     <?php endif; ?>
138 138
 
139 139
                     <table cellpadding="0" cellspacing="0" class="getpaid_invoice_items">
140 140
                         <thead>
141 141
                             <tr>
142
-                                <th class="getpaid-item" colspan="2"><?php _e( 'Item', 'invoicing' ) ?></th>
142
+                                <th class="getpaid-item" colspan="2"><?php _e('Item', 'invoicing') ?></th>
143 143
                                 <th class="getpaid-quantity hide-if-amount text-right">
144
-                                    <span class="getpaid-hide-if-hours"><?php _e( 'Quantity', 'invoicing' ) ?></span>
145
-                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Hours', 'invoicing' ) ?></span>
144
+                                    <span class="getpaid-hide-if-hours"><?php _e('Quantity', 'invoicing') ?></span>
145
+                                    <span class="getpaid-hide-if-quantity"><?php _e('Hours', 'invoicing') ?></span>
146 146
                                 </th>
147 147
                                 <th class="getpaid-price hide-if-amount text-right">
148
-                                    <span class="getpaid-hide-if-hours"><?php _e( 'Price', 'invoicing' ) ?></span>
149
-                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Rate', 'invoicing' ) ?></span>
148
+                                    <span class="getpaid-hide-if-hours"><?php _e('Price', 'invoicing') ?></span>
149
+                                    <span class="getpaid-hide-if-quantity"><?php _e('Rate', 'invoicing') ?></span>
150 150
                                 </th>
151 151
                                 <th class="getpaid-item-subtotal text-right">
152
-                                    <span class="getpaid-hide-if-hours getpaid-hide-if-quantity"><?php _e( 'Amount', 'invoicing' ) ?></span>
153
-                                    <span class="hide-if-amount"><?php _e( 'Total', 'invoicing' ) ?></span>
152
+                                    <span class="getpaid-hide-if-hours getpaid-hide-if-quantity"><?php _e('Amount', 'invoicing') ?></span>
153
+                                    <span class="hide-if-amount"><?php _e('Total', 'invoicing') ?></span>
154 154
                                 </th>
155 155
                                 <th class="getpaid-item-actions hide-if-not-editable" width="70px">&nbsp;</th>
156 156
                             </tr>
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 		                <tbody class="getpaid_invoice_line_items">
159 159
                             <tr class="hide-if-has-items hide-if-not-editable">
160 160
                                 <td colspan="2" class="pt-4 pb-4">
161
-                                    <button type="button" class="button button-primary add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e( 'Add Existing Items', 'invoicing' ) ?></button>
162
-	                                <a href="<?php echo esc_url( $new_item ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item', 'invoicing' ) ?></a>
161
+                                    <button type="button" class="button button-primary add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e('Add Existing Items', 'invoicing') ?></button>
162
+	                                <a href="<?php echo esc_url($new_item); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item', 'invoicing') ?></a>
163 163
                                 </td>
164 164
                                 <td class="hide-if-amount">&nbsp;</th>
165 165
                                 <td class="hide-if-amount">&nbsp;</th>
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
                             <div class="col-12 col-sm-6 offset-sm-6">
192 192
                                 <table class="getpaid-invoice-totals text-right w-100">
193 193
                                     <tbody>
194
-                                        <?php foreach ( apply_filters( 'getpaid_invoice_subtotal_rows', $totals, $invoice ) as $key => $data ) : ?>
195
-                                            <tr class="getpaid-totals-<?php echo sanitize_html_class( $key ); ?>">
196
-                                                <td class="label"><?php echo sanitize_text_field( $data['label'] ) ?>:</td>
194
+                                        <?php foreach (apply_filters('getpaid_invoice_subtotal_rows', $totals, $invoice) as $key => $data) : ?>
195
+                                            <tr class="getpaid-totals-<?php echo sanitize_html_class($key); ?>">
196
+                                                <td class="label"><?php echo sanitize_text_field($data['label']) ?>:</td>
197 197
                                                 <td width="1%"></td>
198
-                                                <td class="value"><?php echo wp_kses_post( $data['value'] ) ?></td>
198
+                                                <td class="value"><?php echo wp_kses_post($data['value']) ?></td>
199 199
                                             </tr>
200 200
                                         <?php endforeach; ?>
201 201
                                     </tbody>
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
                     <div class="getpaid-invoice-item-actions hide-if-no-items hide-if-not-editable">
209 209
                         <div class="row">
210 210
                             <div class="text-left col-12 col-sm-8">
211
-                                <button type="button" class="button add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e( 'Add Existing Item', 'invoicing' ) ?></button>
212
-                                <a href="<?php echo esc_url( $new_item ); ?>" target="_blank" class="button button-secondary"><?php _e( 'Create New Item', 'invoicing' ) ?></a>
213
-                                <?php do_action( 'getpaid-invoice-items-actions', $invoice ); ?>
211
+                                <button type="button" class="button add-invoice-item" data-toggle="modal" data-target="#getpaid-add-items-to-invoice"><?php _e('Add Existing Item', 'invoicing') ?></button>
212
+                                <a href="<?php echo esc_url($new_item); ?>" target="_blank" class="button button-secondary"><?php _e('Create New Item', 'invoicing') ?></a>
213
+                                <?php do_action('getpaid-invoice-items-actions', $invoice); ?>
214 214
                             </div>
215 215
                             <div class="text-right col-12 col-sm-4">
216
-                                <button type="button" class="button button-primary recalculate-totals-button"><?php _e( 'Recalculate Totals', 'invoicing' ) ?></button>
216
+                                <button type="button" class="button button-primary recalculate-totals-button"><?php _e('Recalculate Totals', 'invoicing') ?></button>
217 217
                             </div>
218 218
                         </div>
219 219
                     </div>
220 220
 
221 221
                     <div class="getpaid-invoice-item-actions hide-if-editable">
222
-                        <p class="description m-2 text-right text-muted"><?php _e( 'This invoice is no longer editable', 'invoicing' ); ?></p>
222
+                        <p class="description m-2 text-right text-muted"><?php _e('This invoice is no longer editable', 'invoicing'); ?></p>
223 223
                     </div>
224 224
 
225 225
                     <!-- Add items to an invoice -->
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
                         <div class="modal-dialog modal-dialog-centered" role="document">
228 228
                             <div class="modal-content">
229 229
                                 <div class="modal-header">
230
-                                    <h5 class="modal-title" id="getpaid-add-item-to-invoice-label"><?php _e( "Add Item(s)", 'invoicing' ); ?></h5>
231
-                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e( "Close", 'invoicing' ); ?>">
230
+                                    <h5 class="modal-title" id="getpaid-add-item-to-invoice-label"><?php _e("Add Item(s)", 'invoicing'); ?></h5>
231
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e("Close", 'invoicing'); ?>">
232 232
                                         <span aria-hidden="true">&times;</span>
233 233
                                     </button>
234 234
                                 </div>
@@ -236,17 +236,17 @@  discard block
 block discarded – undo
236 236
                                     <table class="widefat">
237 237
                                         <thead>
238 238
                                             <tr>
239
-                                                <th class="pl-0 text-left"><?php _e( 'Item', 'invoicing' ) ?></th>
239
+                                                <th class="pl-0 text-left"><?php _e('Item', 'invoicing') ?></th>
240 240
                                                 <th class="pr-0 text-right hide-if-amount">
241
-                                                    <span class="getpaid-hide-if-hours"><?php _e( 'Quantity', 'invoicing' ) ?></span>
242
-                                                    <span class="getpaid-hide-if-quantity"><?php _e( 'Hours', 'invoicing' ) ?></span>
241
+                                                    <span class="getpaid-hide-if-hours"><?php _e('Quantity', 'invoicing') ?></span>
242
+                                                    <span class="getpaid-hide-if-quantity"><?php _e('Hours', 'invoicing') ?></span>
243 243
                                                 </th>
244 244
                                             </tr>
245 245
                                         </thead>
246 246
 										<tbody>
247 247
 								            <tr>
248 248
 									            <td class="pl-0 text-left">
249
-                                                    <select class="getpaid-item-search regular-text" data-placeholder="<?php esc_attr_e( 'Search for an item…', 'invoicing' ); ?>"></select>
249
+                                                    <select class="getpaid-item-search regular-text" data-placeholder="<?php esc_attr_e('Search for an item…', 'invoicing'); ?>"></select>
250 250
                                                 </td>
251 251
 									            <td class="pr-0 text-right hide-if-amount">
252 252
                                                     <input type="number" class="w100" step="1" min="1" autocomplete="off" value="1" placeholder="1">
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 						            </table>
257 257
                                 </div>
258 258
                                 <div class="modal-footer">
259
-                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e( 'Cancel', 'invoicing' ); ?></button>
260
-                                    <button type="button" class="btn btn-primary getpaid-add" data-dismiss="modal"><?php _e( 'Add', 'invoicing' ); ?></button>
259
+                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e('Cancel', 'invoicing'); ?></button>
260
+                                    <button type="button" class="btn btn-primary getpaid-add" data-dismiss="modal"><?php _e('Add', 'invoicing'); ?></button>
261 261
                                 </div>
262 262
                             </div>
263 263
                         </div>
@@ -268,8 +268,8 @@  discard block
 block discarded – undo
268 268
                         <div class="modal-dialog modal-dialog-centered" role="document">
269 269
                             <div class="modal-content">
270 270
                                 <div class="modal-header">
271
-                                    <h5 class="modal-title" id="getpaid-edit-invoice-item-label"><?php _e( "Edit Item", 'invoicing' ); ?></h5>
272
-                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e( "Close", 'invoicing' ); ?>">
271
+                                    <h5 class="modal-title" id="getpaid-edit-invoice-item-label"><?php _e("Edit Item", 'invoicing'); ?></h5>
272
+                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php _e("Close", 'invoicing'); ?>">
273 273
                                         <span aria-hidden="true">&times;</span>
274 274
                                     </button>
275 275
                                 </div>
@@ -277,27 +277,27 @@  discard block
 block discarded – undo
277 277
                                     <div class="getpaid-edit-item-div">
278 278
                                         <input type="hidden" name="id" class="form-control form-control-sm item-id">
279 279
                                         <label class="form-group w-100">
280
-                                            <span><?php _e( 'Name', 'invoicing' ); ?></span>
281
-                                            <input type="text" name="name" placeholder="<?php esc_attr_e( 'Item Name', 'invoicing' ); ?>" class="form-control form-control-sm item-name">
280
+                                            <span><?php _e('Name', 'invoicing'); ?></span>
281
+                                            <input type="text" name="name" placeholder="<?php esc_attr_e('Item Name', 'invoicing'); ?>" class="form-control form-control-sm item-name">
282 282
                                         </label>
283 283
                                         <label class="form-group w-100">
284
-                                            <span class="getpaid-hide-if-hours getpaid-hide-if-quantity item-price"><?php _e( 'Amount', 'invoicing' ); ?></span>
285
-                                            <span class="hide-if-amount"><?php _e( 'Price', 'invoicing' ); ?></span>
286
-                                            <input type="text" name="price" placeholder="<?php wpinv_sanitize_amount( 0 ); ?>" class="form-control form-control-sm item-price">
284
+                                            <span class="getpaid-hide-if-hours getpaid-hide-if-quantity item-price"><?php _e('Amount', 'invoicing'); ?></span>
285
+                                            <span class="hide-if-amount"><?php _e('Price', 'invoicing'); ?></span>
286
+                                            <input type="text" name="price" placeholder="<?php wpinv_sanitize_amount(0); ?>" class="form-control form-control-sm item-price">
287 287
                                         </label>
288 288
                                         <label class="form-group w-100 hide-if-amount">
289
-                                            <span><?php _e( 'Quantity', 'invoicing' ); ?></span>
289
+                                            <span><?php _e('Quantity', 'invoicing'); ?></span>
290 290
                                             <input type="number" name="quantity" placeholder="1" class="form-control form-control-sm item-quantity">
291 291
                                         </label>
292 292
                                         <label class="form-group w-100">
293
-                                            <span><?php _e( 'Item Description', 'invoicing' ); ?></span>
294
-                                            <textarea name="description" placeholder="<?php esc_attr_e( 'Enter a description for this item', 'invoicing' ); ?>" class="form-control item-description"></textarea>
293
+                                            <span><?php _e('Item Description', 'invoicing'); ?></span>
294
+                                            <textarea name="description" placeholder="<?php esc_attr_e('Enter a description for this item', 'invoicing'); ?>" class="form-control item-description"></textarea>
295 295
                                         </label>
296 296
                                     </div>
297 297
                                 </div>
298 298
                                 <div class="modal-footer">
299
-                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e( 'Cancel', 'invoicing' ); ?></button>
300
-                                    <button type="button" class="btn btn-primary getpaid-save" data-dismiss="modal"><?php _e( 'Save', 'invoicing' ); ?></button>
299
+                                    <button type="button" class="btn btn-secondary getpaid-cancel" data-dismiss="modal"><?php _e('Cancel', 'invoicing'); ?></button>
300
+                                    <button type="button" class="btn btn-primary getpaid-save" data-dismiss="modal"><?php _e('Save', 'invoicing'); ?></button>
301 301
                                 </div>
302 302
                             </div>
303 303
                         </div>
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-payment-meta.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) {
11
-	exit; // Exit if accessed directly
11
+    exit; // Exit if accessed directly
12 12
 }
13 13
 
14 14
 /**
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 class GetPaid_Meta_Box_Invoice_Payment_Meta {
18 18
 
19 19
     /**
20
-	 * Output the metabox.
21
-	 *
22
-	 * @param WP_Post $post
23
-	 */
20
+     * Output the metabox.
21
+     *
22
+     * @param WP_Post $post
23
+     */
24 24
     public static function output( $post ) {
25 25
 
26 26
         // Prepare the invoice.
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if (!defined('ABSPATH')) {
11 11
 	exit; // Exit if accessed directly
12 12
 }
13 13
 
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WP_Post $post
23 23
 	 */
24
-    public static function output( $post ) {
24
+    public static function output($post) {
25 25
 
26 26
         // Prepare the invoice.
27
-        $invoice = new WPInv_Invoice( $post );
27
+        $invoice = new WPInv_Invoice($post);
28 28
 
29 29
         ?>
30 30
 
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
                                 'id'          => 'wpinv_key',
48 48
                                 'name'        => 'wpinv_key',
49 49
                                 'label'       => sprintf(
50
-                                    __( '%s Key:', 'invoicing' ),
51
-                                    ucfirst( $invoice->get_type() )
50
+                                    __('%s Key:', 'invoicing'),
51
+                                    ucfirst($invoice->get_type())
52 52
                                 ),
53 53
                                 'label_type'  => 'vertical',
54 54
                                 'class'       => 'form-control-sm',
55
-                                'value'       => $invoice->get_key( 'edit' ),
55
+                                'value'       => $invoice->get_key('edit'),
56 56
                                 'extra_attributes' => array(
57 57
                                     'onclick'  => 'this.select();',
58 58
                                     'readonly' => 'true',
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
                                 'id'          => 'wpinv_view_url',
68 68
                                 'name'        => 'wpinv_view_url',
69 69
                                 'label'       => sprintf(
70
-                                    __( '%s URL:', 'invoicing' ),
71
-                                    ucfirst( $invoice->get_type() )
70
+                                    __('%s URL:', 'invoicing'),
71
+                                    ucfirst($invoice->get_type())
72 72
                                 ),
73 73
                                 'label_type'  => 'vertical',
74 74
                                 'class'       => 'form-control-sm',
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                         );
82 82
 
83 83
                         // If the invoice is paid...
84
-                        if ( $invoice->is_paid() || $invoice->is_refunded() ) {
84
+                        if ($invoice->is_paid() || $invoice->is_refunded()) {
85 85
 
86 86
                             // Payment date.
87 87
                             echo aui()->input(
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
                                     'type'        => 'datepicker',
90 90
                                     'id'          => 'wpinv_date_completed',
91 91
                                     'name'        => 'date_completed',
92
-                                    'label'       => __( 'Payment Date:', 'invoicing' ),
92
+                                    'label'       => __('Payment Date:', 'invoicing'),
93 93
                                     'label_type'  => 'vertical',
94 94
                                     'placeholder' => 'YYYY-MM-DD 00:00',
95 95
                                     'class'       => 'form-control-sm',
96
-                                    'value'       => $invoice->get_date_completed( 'edit' ),
96
+                                    'value'       => $invoice->get_date_completed('edit'),
97 97
                                     'extra_attributes' => array(
98 98
                                         'data-enable-time' => 'true',
99 99
                                         'data-time_24hr'   => 'true',
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
                                     'type'        => 'text',
109 109
                                     'id'          => 'wpinv_gateway',
110 110
                                     'name'        => 'wpinv_gateway',
111
-                                    'label'       => __( 'Gateway:', 'invoicing' ),
111
+                                    'label'       => __('Gateway:', 'invoicing'),
112 112
                                     'label_type'  => 'vertical',
113 113
                                     'class'       => 'form-control-sm',
114
-                                    'value'       => wpinv_get_gateway_admin_label( $invoice->get_gateway( 'edit' ) ),
114
+                                    'value'       => wpinv_get_gateway_admin_label($invoice->get_gateway('edit')),
115 115
                                     'extra_attributes' => array(
116 116
                                         'onclick'  => 'this.select();',
117 117
                                         'readonly' => 'true',
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
                                     'type'        => 'text',
126 126
                                     'id'          => 'wpinv_transaction_id',
127 127
                                     'name'        => 'wpinv_transaction_id',
128
-                                    'label'       => __( 'Transaction ID:', 'invoicing' ),
128
+                                    'label'       => __('Transaction ID:', 'invoicing'),
129 129
                                     'label_type'  => 'vertical',
130 130
                                     'class'       => 'form-control-sm',
131
-                                    'value'       => $invoice->get_transaction_id( 'edit' ),
132
-                                    'help_text'   => apply_filters( 'wpinv_invoice_transaction_link_' . $invoice->get_gateway( 'edit' ), '', $invoice->get_transaction_id(), $invoice ),
131
+                                    'value'       => $invoice->get_transaction_id('edit'),
132
+                                    'help_text'   => apply_filters('wpinv_invoice_transaction_link_' . $invoice->get_gateway('edit'), '', $invoice->get_transaction_id(), $invoice),
133 133
                                     'extra_attributes' => array(
134 134
                                         'onclick'  => 'this.select();',
135 135
                                         'readonly' => 'true',
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
                                     'type'        => 'text',
144 144
                                     'id'          => 'wpinv_currency',
145 145
                                     'name'        => 'wpinv_currency',
146
-                                    'label'       => __( 'Currency:', 'invoicing' ),
146
+                                    'label'       => __('Currency:', 'invoicing'),
147 147
                                     'label_type'  => 'vertical',
148 148
                                     'class'       => 'form-control-sm',
149
-                                    'value'       => $invoice->get_currency( 'edit' ),
149
+                                    'value'       => $invoice->get_currency('edit'),
150 150
                                     'extra_attributes' => array(
151 151
                                         'onclick'  => 'this.select();',
152 152
                                         'readonly' => 'true',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
                         } else {
158 158
 
159
-                            if ( 'wpi_invoice' == $invoice->get_post_type() ) {
159
+                            if ('wpi_invoice' == $invoice->get_post_type()) {
160 160
 
161 161
                                 // Payment URL.
162 162
                                 echo aui()->input(
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                                         'type'        => 'text',
165 165
                                         'id'          => 'wpinv_payment_url',
166 166
                                         'name'        => 'wpinv_payment_url',
167
-                                        'label'       => __( 'Payment URL:', 'invoicing' ),
167
+                                        'label'       => __('Payment URL:', 'invoicing'),
168 168
                                         'label_type'  => 'vertical',
169 169
                                         'class'       => 'form-control-sm',
170 170
                                         'value'       => $invoice->get_checkout_payment_url(),
@@ -180,13 +180,13 @@  discard block
 block discarded – undo
180 180
                                     array(
181 181
                                         'id'               => 'wpinv_gateway',
182 182
                                         'name'             => 'wpinv_gateway',
183
-                                        'label'            => __( 'Gateway:', 'invoicing' ),
183
+                                        'label'            => __('Gateway:', 'invoicing'),
184 184
                                         'label_type'       => 'vertical',
185
-                                        'placeholder'      => __( 'Select Gateway', 'invoicing' ),
186
-                                        'value'            => $invoice->get_gateway( 'edit' ),
185
+                                        'placeholder'      => __('Select Gateway', 'invoicing'),
186
+                                        'value'            => $invoice->get_gateway('edit'),
187 187
                                         'select2'          => true,
188 188
                                         'data-allow-clear' => 'false',
189
-                                        'options'          => wp_list_pluck( wpinv_get_enabled_payment_gateways( true ), 'admin_label' ),
189
+                                        'options'          => wp_list_pluck(wpinv_get_enabled_payment_gateways(true), 'admin_label'),
190 190
                                     )
191 191
                                 );
192 192
 
Please login to merge, or discard this patch.