Passed
Push — master ( c19bc8...060af4 )
by Brian
04:45
created
includes/class-wpinv-payment-form-elements.php 1 patch
Spacing   +311 added lines, -311 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'ABSPATH' ) ) {
3
+if (!defined('ABSPATH')) {
4 4
     exit; // Exit if accessed directly
5 5
 }
6 6
 
@@ -13,15 +13,15 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function __construct() {
15 15
 
16
-        foreach( $this->get_elements() as $element ) {
16
+        foreach ($this->get_elements() as $element) {
17 17
             $element = $element['type'];
18 18
 
19
-            if ( method_exists( $this, "render_{$element}_template" ) ) {
20
-                add_action( 'wpinv_payment_form_render_element_template', array( $this, "render_{$element}_template" ), 10, 2 );
19
+            if (method_exists($this, "render_{$element}_template")) {
20
+                add_action('wpinv_payment_form_render_element_template', array($this, "render_{$element}_template"), 10, 2);
21 21
             }
22 22
 
23
-            if ( method_exists( $this, "edit_{$element}_template" ) ) {
24
-                add_action( 'wpinv_payment_form_edit_element_template', array( $this, "edit_{$element}_template" ), 10, 2 );
23
+            if (method_exists($this, "edit_{$element}_template")) {
24
+                add_action('wpinv_payment_form_edit_element_template', array($this, "edit_{$element}_template"), 10, 2);
25 25
             }
26 26
 
27 27
 
@@ -34,20 +34,20 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function get_elements() {
36 36
 
37
-        if ( ! empty( $this->elements ) ) {
37
+        if (!empty($this->elements)) {
38 38
             return $this->elements;
39 39
         }
40 40
 
41
-        $this->elements = wpinv_get_data( 'payment-form-elements' );
41
+        $this->elements = wpinv_get_data('payment-form-elements');
42 42
 
43
-        $this->elements = apply_filters( 'wpinv_filter_core_payment_form_elements', $this->elements );
43
+        $this->elements = apply_filters('wpinv_filter_core_payment_form_elements', $this->elements);
44 44
         return $this->elements;
45 45
     }
46 46
 
47 47
     /**
48 48
      * Returns the restrict markup.
49 49
      */
50
-    public function get_restrict_markup( $field, $field_type ) {
50
+    public function get_restrict_markup($field, $field_type) {
51 51
         $restrict = "$field.type=='$field_type'";
52 52
         return "v-if=\"$restrict\"";
53 53
     }
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Renders the gateway select element template.
57 57
      */
58
-    public function render_gateway_select_template( $field ) {
59
-        $restrict = $this->get_restrict_markup( $field, 'gateway_select' );
60
-        $text     = __( 'The gateway select box will appear here', 'invoicing' );
58
+    public function render_gateway_select_template($field) {
59
+        $restrict = $this->get_restrict_markup($field, 'gateway_select');
60
+        $text     = __('The gateway select box will appear here', 'invoicing');
61 61
         echo "
62 62
             <div $restrict class='alert alert-info' role='alert'>
63 63
                 <span>$text</span>
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
     /**
69 69
      * Renders the edit gateway select element template.
70 70
      */
71
-    public function edit_gateway_select_template( $field ) {
72
-        $restrict = $this->get_restrict_markup( $field, 'gateway_select' );
73
-        $label    = __( 'The gateway select text', 'invoicing' );
71
+    public function edit_gateway_select_template($field) {
72
+        $restrict = $this->get_restrict_markup($field, 'gateway_select');
73
+        $label    = __('The gateway select text', 'invoicing');
74 74
         $id       = $field . '.id + "_edit"';
75 75
         echo "
76 76
             <div $restrict>
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * Renders the ip address element template.
88 88
      */
89
-    public function render_ip_address_template( $field ) {
90
-        $restrict   = $this->get_restrict_markup( $field, 'ip_address' );
91
-        $ip_address = sanitize_text_field( wpinv_get_ip() );
92
-        $url        = esc_url( getpaid_ip_location_url( $ip_address ) );
89
+    public function render_ip_address_template($field) {
90
+        $restrict   = $this->get_restrict_markup($field, 'ip_address');
91
+        $ip_address = sanitize_text_field(wpinv_get_ip());
92
+        $url        = esc_url(getpaid_ip_location_url($ip_address));
93 93
 
94 94
         echo "
95 95
             <div $restrict class='getpaid-ip-info'>
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * Renders the edit ip address element template.
104 104
      */
105
-    public function edit_ip_address_template( $field ) {
106
-        $restrict = $this->get_restrict_markup( $field, 'ip_address' );
107
-        $label    = __( 'The IP Address text', 'invoicing' );
105
+    public function edit_ip_address_template($field) {
106
+        $restrict = $this->get_restrict_markup($field, 'ip_address');
107
+        $label    = __('The IP Address text', 'invoicing');
108 108
         $id       = $field . '.id + "_edit"';
109 109
         echo "
110 110
             <div $restrict>
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
     /**
121 121
      * Renders the total payable element template.
122 122
      */
123
-    public function render_total_payable_template( $field ) {
124
-        $restrict = $this->get_restrict_markup( $field, 'total_payable' );
125
-        $text     = __( 'The total payable amount will appear here', 'invoicing' );
123
+    public function render_total_payable_template($field) {
124
+        $restrict = $this->get_restrict_markup($field, 'total_payable');
125
+        $text     = __('The total payable amount will appear here', 'invoicing');
126 126
         echo "
127 127
             <div $restrict class='alert alert-info' role='alert'>
128 128
                 <span>$text</span>
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
     /**
134 134
      * Renders the edit total payable element template.
135 135
      */
136
-    public function edit_total_payable_template( $field ) {
137
-        $restrict = $this->get_restrict_markup( $field, 'total_payable' );
138
-        $label    = __( 'The total payable text', 'invoicing' );
136
+    public function edit_total_payable_template($field) {
137
+        $restrict = $this->get_restrict_markup($field, 'total_payable');
138
+        $label    = __('The total payable text', 'invoicing');
139 139
         $id       = $field . '.id + "_edit"';
140 140
         echo "
141 141
             <div $restrict>
@@ -151,18 +151,18 @@  discard block
 block discarded – undo
151 151
     /**
152 152
      * Renders the title element template.
153 153
      */
154
-    public function render_heading_template( $field ) {
155
-        $restrict = $this->get_restrict_markup( $field, 'heading' );
154
+    public function render_heading_template($field) {
155
+        $restrict = $this->get_restrict_markup($field, 'heading');
156 156
         echo "<component :is='$field.level' $restrict v-html='$field.text'></component>";
157 157
     }
158 158
 
159 159
     /**
160 160
      * Renders the edit title element template.
161 161
      */
162
-    public function edit_heading_template( $field ) {
163
-        $restrict = $this->get_restrict_markup( $field, 'heading' );
164
-        $label    = __( 'Heading', 'invoicing' );
165
-        $label2   = __( 'Select Heading Level', 'invoicing' );
162
+    public function edit_heading_template($field) {
163
+        $restrict = $this->get_restrict_markup($field, 'heading');
164
+        $label    = __('Heading', 'invoicing');
165
+        $label2   = __('Select Heading Level', 'invoicing');
166 166
         $id       = $field . '.id + "_edit"';
167 167
         $id2      = $field . '.id + "_edit2"';
168 168
 
@@ -194,8 +194,8 @@  discard block
 block discarded – undo
194 194
     /**
195 195
      * Renders a paragraph element template.
196 196
      */
197
-    public function render_paragraph_template( $field ) {
198
-        $restrict = $this->get_restrict_markup( $field, 'paragraph' );
197
+    public function render_paragraph_template($field) {
198
+        $restrict = $this->get_restrict_markup($field, 'paragraph');
199 199
         $label    = "$field.text";
200 200
         echo "<p $restrict v-html='$label' style='font-size: 16px;'></p>";
201 201
     }
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
     /**
204 204
      * Renders the edit paragraph element template.
205 205
      */
206
-    public function edit_paragraph_template( $field ) {
207
-        $restrict = $this->get_restrict_markup( $field, 'paragraph' );
208
-        $label    = __( 'Enter your text', 'invoicing' );
206
+    public function edit_paragraph_template($field) {
207
+        $restrict = $this->get_restrict_markup($field, 'paragraph');
208
+        $label    = __('Enter your text', 'invoicing');
209 209
         $id       = $field . '.id + "_edit"';
210 210
         echo "
211 211
             <div $restrict>
@@ -221,8 +221,8 @@  discard block
 block discarded – undo
221 221
     /**
222 222
      * Renders the text element template.
223 223
      */
224
-    public function render_text_template( $field ) {
225
-        $restrict = $this->get_restrict_markup( $field, 'text' );
224
+    public function render_text_template($field) {
225
+        $restrict = $this->get_restrict_markup($field, 'text');
226 226
         $label    = "$field.label";
227 227
         echo "
228 228
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -237,56 +237,56 @@  discard block
 block discarded – undo
237 237
     /**
238 238
      * Renders the edit price select element template.
239 239
      */
240
-    public function edit_price_select_template( $field ) {
241
-        $restrict = $this->get_restrict_markup( $field, 'price_select' );
240
+    public function edit_price_select_template($field) {
241
+        $restrict = $this->get_restrict_markup($field, 'price_select');
242 242
         
243
-        $label3   = __( 'Help text', 'invoicing' );
244
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
243
+        $label3   = __('Help text', 'invoicing');
244
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
245 245
         $id3      = $field . '.id + "_edit3"';
246
-        $label6   = __( 'Options', 'invoicing' );
246
+        $label6   = __('Options', 'invoicing');
247 247
         $id6      = $field . '.id + "_edit5"';
248 248
         ?>
249 249
             <div <?php echo $restrict; ?>>
250
-                <small class='form-text text-muted mb-2'><?php _e( 'This amount will be added to the total amount for this form', 'invoicing' ); ?></small>
250
+                <small class='form-text text-muted mb-2'><?php _e('This amount will be added to the total amount for this form', 'invoicing'); ?></small>
251 251
                 <div class='form-group'>
252 252
                     <label class="d-block">
253
-                        <span><?php _e( 'Field Label', 'invoicing' ); ?></span>
253
+                        <span><?php _e('Field Label', 'invoicing'); ?></span>
254 254
                         <input v-model='<?php echo $field; ?>.label' class='form-control' />
255 255
                     </label>
256 256
                 </div>
257 257
 
258 258
                 <div class='form-group' v-if="<?php echo $field; ?>.select_type=='select'">
259 259
                     <label class="d-block">
260
-                        <span><?php _e( 'Placeholder text', 'invoicing' ); ?></span>
260
+                        <span><?php _e('Placeholder text', 'invoicing'); ?></span>
261 261
                         <input v-model='<?php echo $field; ?>.placeholder' class='form-control' />
262 262
                     </label>
263 263
                 </div>
264 264
 
265 265
                 <div class='form-group'>
266 266
                     <label class="d-block">
267
-                        <span><?php _e( 'Select Type', 'invoicing' ); ?></span>
267
+                        <span><?php _e('Select Type', 'invoicing'); ?></span>
268 268
                         <select class='form-control custom-select' v-model='<?php echo $field; ?>.select_type'>
269
-                            <option value='select'><?php _e( 'Dropdown', 'invoicing' ) ?></option>
270
-                            <option value='checkboxes'><?php _e( 'Checkboxes', 'invoicing' ) ?></option>
271
-                            <option value='radios'><?php _e( 'Radio Buttons', 'invoicing' ) ?></option>
272
-                            <option value='buttons'><?php _e( 'Buttons', 'invoicing' ) ?></option>
273
-                            <option value='circles'><?php _e( 'Circles', 'invoicing' ) ?></option>
269
+                            <option value='select'><?php _e('Dropdown', 'invoicing') ?></option>
270
+                            <option value='checkboxes'><?php _e('Checkboxes', 'invoicing') ?></option>
271
+                            <option value='radios'><?php _e('Radio Buttons', 'invoicing') ?></option>
272
+                            <option value='buttons'><?php _e('Buttons', 'invoicing') ?></option>
273
+                            <option value='circles'><?php _e('Circles', 'invoicing') ?></option>
274 274
                         </select>
275 275
                     </label>
276 276
                 </div>
277 277
 
278 278
                 <div class='form-group'>
279 279
                     <label class="d-block">
280
-                        <span><?php _e( 'Options', 'invoicing' ); ?></span>
280
+                        <span><?php _e('Options', 'invoicing'); ?></span>
281 281
                         <textarea placeholder='Basic|10,Pro|99,Business|199' v-model='<?php echo $field; ?>.options' class='form-control' rows='3'></textarea>
282
-                        <small class='form-text text-muted mb-2'><?php _e( 'Use commas to separate options and pipes to separate a label and its price. Do not include a currency symbol in the price.', 'invoicing' ); ?></small>
282
+                        <small class='form-text text-muted mb-2'><?php _e('Use commas to separate options and pipes to separate a label and its price. Do not include a currency symbol in the price.', 'invoicing'); ?></small>
283 283
                     </label>
284 284
                 </div>
285 285
 
286 286
                 <div class='form-group'>
287 287
                     <label class="d-block">
288
-                        <span><?php _e( 'Help Text', 'invoicing' ); ?></span>
289
-                        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='<?php echo $field; ?>.description' class='form-control' rows='3'></textarea>
288
+                        <span><?php _e('Help Text', 'invoicing'); ?></span>
289
+                        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='<?php echo $field; ?>.description' class='form-control' rows='3'></textarea>
290 290
                     </label>
291 291
                 </div>
292 292
             </div>
@@ -297,8 +297,8 @@  discard block
 block discarded – undo
297 297
     /**
298 298
      * Renders the price select element template.
299 299
      */
300
-    public function render_price_select_template( $field ) {
301
-        $restrict = $this->get_restrict_markup( $field, 'price_select' );
300
+    public function render_price_select_template($field) {
301
+        $restrict = $this->get_restrict_markup($field, 'price_select');
302 302
         ?>
303 303
             <div <?php echo $restrict; ?> class='wpinv-payment-form-field-preview'>
304 304
                 <div class='wpinv-payment-form-field-preview-overlay'></div>
@@ -306,24 +306,24 @@  discard block
 block discarded – undo
306 306
                 <label>{{<?php echo $field; ?>.label}}</label>
307 307
 
308 308
                 <!-- Buttons -->
309
-                <div v-if='<?php echo esc_attr( $field ); ?>.select_type=="buttons"' class="getpaid-price-buttons">
310
-                    <span v-for="(option, index) in <?php echo esc_attr( $field ); ?>.options.split(',')" :key="index">
311
-                        <input type="radio" :id="<?php echo esc_attr( $field ); ?>.id + index" :checked="index==0" />
312
-                        <label :for="<?php echo esc_attr( $field ); ?>.id + index" class="rounded">{{option | optionize}}</label>
309
+                <div v-if='<?php echo esc_attr($field); ?>.select_type=="buttons"' class="getpaid-price-buttons">
310
+                    <span v-for="(option, index) in <?php echo esc_attr($field); ?>.options.split(',')" :key="index">
311
+                        <input type="radio" :id="<?php echo esc_attr($field); ?>.id + index" :checked="index==0" />
312
+                        <label :for="<?php echo esc_attr($field); ?>.id + index" class="rounded">{{option | optionize}}</label>
313 313
                     </span>
314 314
                 </div>
315 315
 
316 316
                 <!-- Circles -->
317
-                <div v-if='<?php echo esc_attr( $field ); ?>.select_type=="circles"' class="getpaid-price-buttons getpaid-price-circles">
318
-                    <span v-for="(option, index) in <?php echo esc_attr( $field ); ?>.options.split(',')" :key="index">
319
-                        <input type="radio" :id="<?php echo esc_attr( $field ); ?>.id + index" :checked="index==0" />
320
-                        <label :for="<?php echo esc_attr( $field ); ?>.id + index"><span>{{option | optionize}}</span></label>
317
+                <div v-if='<?php echo esc_attr($field); ?>.select_type=="circles"' class="getpaid-price-buttons getpaid-price-circles">
318
+                    <span v-for="(option, index) in <?php echo esc_attr($field); ?>.options.split(',')" :key="index">
319
+                        <input type="radio" :id="<?php echo esc_attr($field); ?>.id + index" :checked="index==0" />
320
+                        <label :for="<?php echo esc_attr($field); ?>.id + index"><span>{{option | optionize}}</span></label>
321 321
                     </span>
322 322
                 </div>
323 323
 
324 324
                 <!-- Radios -->
325
-                <div v-if='<?php echo esc_attr( $field ); ?>.select_type=="radios"'>
326
-                    <div v-for="(option, index) in <?php echo esc_attr( $field ); ?>.options.split(',')" :key="index">
325
+                <div v-if='<?php echo esc_attr($field); ?>.select_type=="radios"'>
326
+                    <div v-for="(option, index) in <?php echo esc_attr($field); ?>.options.split(',')" :key="index">
327 327
                         <label>
328 328
                             <input type="radio" :checked="index==0" />
329 329
                             <span>{{option | optionize}}</span>
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
                 </div>
333 333
 
334 334
                 <!-- Checkboxes -->
335
-                <div v-if='<?php echo esc_attr( $field ); ?>.select_type=="checkboxes"'>
336
-                    <div v-for="(option, index) in <?php echo esc_attr( $field ); ?>.options.split(',')" :key="index">
335
+                <div v-if='<?php echo esc_attr($field); ?>.select_type=="checkboxes"'>
336
+                    <div v-for="(option, index) in <?php echo esc_attr($field); ?>.options.split(',')" :key="index">
337 337
                         <label>
338 338
                             <input type="checkbox" :checked="index==0" />
339 339
                             <span>{{option | optionize}}</span>
@@ -342,15 +342,15 @@  discard block
 block discarded – undo
342 342
                 </div>
343 343
 
344 344
                 <!-- Select -->
345
-                <select v-if='<?php echo esc_attr( $field ); ?>.select_type=="select"' class='form-control custom-select'>
346
-                    <option v-if="<?php echo esc_attr( $field ); ?>.placeholder" selected="selected">
347
-                        {{<?php echo esc_attr( $field ); ?>.placeholder}}
345
+                <select v-if='<?php echo esc_attr($field); ?>.select_type=="select"' class='form-control custom-select'>
346
+                    <option v-if="<?php echo esc_attr($field); ?>.placeholder" selected="selected">
347
+                        {{<?php echo esc_attr($field); ?>.placeholder}}
348 348
                     </option>
349
-                    <option v-for="(option, index) in <?php echo esc_attr( $field ); ?>.options.split(',')" :key="index">
349
+                    <option v-for="(option, index) in <?php echo esc_attr($field); ?>.options.split(',')" :key="index">
350 350
                         {{option | optionize}}
351 351
                     </option>
352 352
                 </select>
353
-                <small v-if='<?php echo esc_attr( $field ); ?>.description' class='form-text text-muted' v-html='<?php echo esc_attr( $field ); ?>.description'></small>
353
+                <small v-if='<?php echo esc_attr($field); ?>.description' class='form-text text-muted' v-html='<?php echo esc_attr($field); ?>.description'></small>
354 354
             </div>
355 355
 
356 356
         <?php
@@ -359,17 +359,17 @@  discard block
 block discarded – undo
359 359
     /**
360 360
      * Renders the edit price input element template.
361 361
      */
362
-    public function edit_price_input_template( $field ) {
363
-        $restrict = $this->get_restrict_markup( $field, 'price_input' );
364
-        $label    = __( 'Field Label', 'invoicing' );
362
+    public function edit_price_input_template($field) {
363
+        $restrict = $this->get_restrict_markup($field, 'price_input');
364
+        $label    = __('Field Label', 'invoicing');
365 365
         $id       = $field . '.id + "_edit"';
366
-        $label2   = __( 'Placeholder text', 'invoicing' );
366
+        $label2   = __('Placeholder text', 'invoicing');
367 367
         $id2      = $field . '.id + "_edit2"';
368
-        $label3   = __( 'Help text', 'invoicing' );
369
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
368
+        $label3   = __('Help text', 'invoicing');
369
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
370 370
         $id3      = $field . '.id + "_edit3"';
371
-        $label5   = __( 'The amount that users add to this field will be added to the total amount', 'invoicing' );
372
-        $label6   = __( 'Default Amount', 'invoicing' );
371
+        $label5   = __('The amount that users add to this field will be added to the total amount', 'invoicing');
372
+        $label6   = __('Default Amount', 'invoicing');
373 373
         $id6      = $field . '.id + "_edit5"';
374 374
         echo "
375 375
             <div $restrict>
@@ -397,16 +397,16 @@  discard block
 block discarded – undo
397 397
     /**
398 398
      * Renders the edit text element template.
399 399
      */
400
-    public function edit_text_template( $field ) {
401
-        $restrict = $this->get_restrict_markup( $field, 'text' );
402
-        $label    = __( 'Field Label', 'invoicing' );
400
+    public function edit_text_template($field) {
401
+        $restrict = $this->get_restrict_markup($field, 'text');
402
+        $label    = __('Field Label', 'invoicing');
403 403
         $id       = $field . '.id + "_edit"';
404
-        $label2   = __( 'Placeholder text', 'invoicing' );
404
+        $label2   = __('Placeholder text', 'invoicing');
405 405
         $id2      = $field . '.id + "_edit2"';
406
-        $label3   = __( 'Help text', 'invoicing' );
407
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
406
+        $label3   = __('Help text', 'invoicing');
407
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
408 408
         $id3      = $field . '.id + "_edit3"';
409
-        $label5   = __( 'Is this field required?', 'invoicing' );
409
+        $label5   = __('Is this field required?', 'invoicing');
410 410
         $id4      = $field . '.id + "_edit4"';
411 411
         echo "
412 412
             <div $restrict>
@@ -434,8 +434,8 @@  discard block
 block discarded – undo
434 434
     /**
435 435
      * Renders the textarea element template.
436 436
      */
437
-    public function render_textarea_template( $field ) {
438
-        $restrict = $this->get_restrict_markup( $field, 'textarea' );
437
+    public function render_textarea_template($field) {
438
+        $restrict = $this->get_restrict_markup($field, 'textarea');
439 439
         $label    = "$field.label";
440 440
         echo "
441 441
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -450,16 +450,16 @@  discard block
 block discarded – undo
450 450
     /**
451 451
      * Renders the edit textarea element template.
452 452
      */
453
-    public function edit_textarea_template( $field ) {
454
-        $restrict = $this->get_restrict_markup( $field, 'textarea' );
455
-        $label    = __( 'Field Label', 'invoicing' );
453
+    public function edit_textarea_template($field) {
454
+        $restrict = $this->get_restrict_markup($field, 'textarea');
455
+        $label    = __('Field Label', 'invoicing');
456 456
         $id       = $field . '.id + "_edit"';
457
-        $label2   = __( 'Placeholder text', 'invoicing' );
457
+        $label2   = __('Placeholder text', 'invoicing');
458 458
         $id2      = $field . '.id + "_edit2"';
459
-        $label3   = __( 'Help text', 'invoicing' );
460
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
459
+        $label3   = __('Help text', 'invoicing');
460
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
461 461
         $id3      = $field . '.id + "_edit3"';
462
-        $label5   = __( 'Is this field required?', 'invoicing' );
462
+        $label5   = __('Is this field required?', 'invoicing');
463 463
         $id4      = $field . '.id + "_edit4"';
464 464
         echo "
465 465
             <div $restrict>
@@ -487,8 +487,8 @@  discard block
 block discarded – undo
487 487
     /**
488 488
      * Renders the select element template.
489 489
      */
490
-    public function render_select_template( $field ) {
491
-        $restrict    = $this->get_restrict_markup( $field, 'select' );
490
+    public function render_select_template($field) {
491
+        $restrict    = $this->get_restrict_markup($field, 'select');
492 492
         $label       = "$field.label";
493 493
         $placeholder = "$field.placeholder";
494 494
         $id          = $field . '.id';
@@ -508,18 +508,18 @@  discard block
 block discarded – undo
508 508
     /**
509 509
      * Renders the edit select element template.
510 510
      */
511
-    public function edit_select_template( $field ) {
512
-        $restrict = $this->get_restrict_markup( $field, 'select' );
513
-        $label    = __( 'Field Label', 'invoicing' );
511
+    public function edit_select_template($field) {
512
+        $restrict = $this->get_restrict_markup($field, 'select');
513
+        $label    = __('Field Label', 'invoicing');
514 514
         $id       = $field . '.id + "_edit"';
515
-        $label2   = __( 'Placeholder text', 'invoicing' );
515
+        $label2   = __('Placeholder text', 'invoicing');
516 516
         $id2      = $field . '.id + "_edit2"';
517
-        $label3   = __( 'Help text', 'invoicing' );
518
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
517
+        $label3   = __('Help text', 'invoicing');
518
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
519 519
         $id3      = $field . '.id + "_edit3"';
520
-        $label5   = __( 'Is this field required?', 'invoicing' );
520
+        $label5   = __('Is this field required?', 'invoicing');
521 521
         $id4      = $field . '.id + "_edit4"';
522
-        $label6   = __( 'Available Options', 'invoicing' );
522
+        $label6   = __('Available Options', 'invoicing');
523 523
         echo "
524 524
             <div $restrict>
525 525
                 <div class='form-group'>
@@ -557,8 +557,8 @@  discard block
 block discarded – undo
557 557
     /**
558 558
      * Renders the checkbox element template.
559 559
      */
560
-    public function render_checkbox_template( $field ) {
561
-        $restrict = $this->get_restrict_markup( $field, 'checkbox' );
560
+    public function render_checkbox_template($field) {
561
+        $restrict = $this->get_restrict_markup($field, 'checkbox');
562 562
         echo "
563 563
             <div class='form-check' $restrict>
564 564
                 <div class='wpinv-payment-form-field-preview-overlay'></div>
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
     /**
573 573
      * Renders the edit checkbox element template.
574 574
      */
575
-    public function edit_checkbox_template( $field ) {
576
-        $restrict = $this->get_restrict_markup( $field, 'checkbox' );
577
-        $label    = __( 'Field Label', 'invoicing' );
575
+    public function edit_checkbox_template($field) {
576
+        $restrict = $this->get_restrict_markup($field, 'checkbox');
577
+        $label    = __('Field Label', 'invoicing');
578 578
         $id       = $field . '.id + "_edit"';
579
-        $label2   = __( 'Help text', 'invoicing' );
580
-        $label3   = esc_attr__( 'Add some help text for this field', 'invoicing' );
579
+        $label2   = __('Help text', 'invoicing');
580
+        $label3   = esc_attr__('Add some help text for this field', 'invoicing');
581 581
         $id2      = $field . '.id + "_edit2"';
582
-        $label4   = __( 'Is this field required?', 'invoicing' );
582
+        $label4   = __('Is this field required?', 'invoicing');
583 583
         $id3      = $field . '.id + "_edit3"';
584 584
         echo "
585 585
             <div $restrict>
@@ -603,8 +603,8 @@  discard block
 block discarded – undo
603 603
     /**
604 604
      * Renders the radio element template.
605 605
      */
606
-    public function render_radio_template( $field ) {
607
-        $restrict    = $this->get_restrict_markup( $field, 'radio' );
606
+    public function render_radio_template($field) {
607
+        $restrict    = $this->get_restrict_markup($field, 'radio');
608 608
         $label       = "$field.label";
609 609
         $id          = $field . '.id';
610 610
         echo "
@@ -623,16 +623,16 @@  discard block
 block discarded – undo
623 623
     /**
624 624
      * Renders the edit radio element template.
625 625
      */
626
-    public function edit_radio_template( $field ) {
627
-        $restrict = $this->get_restrict_markup( $field, 'radio' );
628
-        $label    = __( 'Field Label', 'invoicing' );
626
+    public function edit_radio_template($field) {
627
+        $restrict = $this->get_restrict_markup($field, 'radio');
628
+        $label    = __('Field Label', 'invoicing');
629 629
         $id       = $field . '.id + "_edit"';
630
-        $label2   = __( 'Help text', 'invoicing' );
631
-        $label3   = esc_attr__( 'Add some help text for this field', 'invoicing' );
630
+        $label2   = __('Help text', 'invoicing');
631
+        $label3   = esc_attr__('Add some help text for this field', 'invoicing');
632 632
         $id2      = $field . '.id + "_edit3"';
633
-        $label4   = __( 'Is this field required?', 'invoicing' );
633
+        $label4   = __('Is this field required?', 'invoicing');
634 634
         $id3      = $field . '.id + "_edit4"';
635
-        $label5   = __( 'Available Options', 'invoicing' );
635
+        $label5   = __('Available Options', 'invoicing');
636 636
         echo "
637 637
             <div $restrict>
638 638
                 <div class='form-group'>
@@ -666,8 +666,8 @@  discard block
 block discarded – undo
666 666
     /**
667 667
      * Renders the address element template.
668 668
      */
669
-    public function render_address_template( $field ) {
670
-        $restrict    = $this->get_restrict_markup( $field, 'address' );
669
+    public function render_address_template($field) {
670
+        $restrict = $this->get_restrict_markup($field, 'address');
671 671
 
672 672
         echo "
673 673
             <div class='wpinv-address-wrapper' $restrict>
@@ -689,13 +689,13 @@  discard block
 block discarded – undo
689 689
     /**
690 690
      * Renders the edit address element template.
691 691
      */
692
-    public function edit_address_template( $field ) {
693
-        $restrict  = $this->get_restrict_markup( $field, 'address' );
694
-        $label     = __( 'Field Label', 'invoicing' );
695
-        $label2    = __( 'Placeholder', 'invoicing' );
696
-        $label3    = __( 'Description', 'invoicing' );
697
-        $label4    = __( 'Is required', 'invoicing' );
698
-        $label5    = __( 'Is visible', 'invoicing' );
692
+    public function edit_address_template($field) {
693
+        $restrict  = $this->get_restrict_markup($field, 'address');
694
+        $label     = __('Field Label', 'invoicing');
695
+        $label2    = __('Placeholder', 'invoicing');
696
+        $label3    = __('Description', 'invoicing');
697
+        $label4    = __('Is required', 'invoicing');
698
+        $label5    = __('Is visible', 'invoicing');
699 699
         $id        = $field . '.id + "_edit_label"';
700 700
         $id2       = $field . '.id + "_edit_placeholder"';
701 701
         $id3       = $field . '.id + "_edit_description"';
@@ -763,8 +763,8 @@  discard block
 block discarded – undo
763 763
     /**
764 764
      * Renders the email element template.
765 765
      */
766
-    public function render_email_template( $field ) {
767
-        $restrict = $this->get_restrict_markup( $field, 'email' );
766
+    public function render_email_template($field) {
767
+        $restrict = $this->get_restrict_markup($field, 'email');
768 768
         $label    = "$field.label";
769 769
         echo "
770 770
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -779,8 +779,8 @@  discard block
 block discarded – undo
779 779
     /**
780 780
      * Renders the billing_email element template.
781 781
      */
782
-    public function render_billing_email_template( $field ) {
783
-        $restrict = $this->get_restrict_markup( $field, 'billing_email' );
782
+    public function render_billing_email_template($field) {
783
+        $restrict = $this->get_restrict_markup($field, 'billing_email');
784 784
         $label    = "$field.label";
785 785
         echo "
786 786
             <div $restrict>
@@ -794,16 +794,16 @@  discard block
 block discarded – undo
794 794
     /**
795 795
      * Renders the edit email element template.
796 796
      */
797
-    public function edit_email_template( $field ) {
798
-        $restrict = $this->get_restrict_markup( $field, 'email' );
799
-        $label    = __( 'Field Label', 'invoicing' );
797
+    public function edit_email_template($field) {
798
+        $restrict = $this->get_restrict_markup($field, 'email');
799
+        $label    = __('Field Label', 'invoicing');
800 800
         $id       = $field . '.id + "_edit"';
801
-        $label2   = __( 'Placeholder text', 'invoicing' );
801
+        $label2   = __('Placeholder text', 'invoicing');
802 802
         $id2      = $field . '.id + "_edit2"';
803
-        $label3   = __( 'Help text', 'invoicing' );
804
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
803
+        $label3   = __('Help text', 'invoicing');
804
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
805 805
         $id3      = $field . '.id + "_edit3"';
806
-        $label5   = __( 'Is this field required?', 'invoicing' );
806
+        $label5   = __('Is this field required?', 'invoicing');
807 807
         $id4      = $field . '.id + "_edit4"';
808 808
         echo "
809 809
             <div $restrict>
@@ -831,16 +831,16 @@  discard block
 block discarded – undo
831 831
     /**
832 832
      * Renders the edit billing_email element template.
833 833
      */
834
-    public function edit_billing_email_template( $field ) {
835
-        $restrict = $this->get_restrict_markup( $field, 'billing_email' );
836
-        $label    = __( 'Field Label', 'invoicing' );
834
+    public function edit_billing_email_template($field) {
835
+        $restrict = $this->get_restrict_markup($field, 'billing_email');
836
+        $label    = __('Field Label', 'invoicing');
837 837
         $id       = $field . '.id + "_edit"';
838
-        $label2   = __( 'Placeholder text', 'invoicing' );
838
+        $label2   = __('Placeholder text', 'invoicing');
839 839
         $id2      = $field . '.id + "_edit2"';
840
-        $label3   = __( 'Help text', 'invoicing' );
841
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
840
+        $label3   = __('Help text', 'invoicing');
841
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
842 842
         $id3      = $field . '.id + "_edit3"';
843
-        $label5   = __( 'Is this field required?', 'invoicing' );
843
+        $label5   = __('Is this field required?', 'invoicing');
844 844
         $id4      = $field . '.id + "_edit4"';
845 845
         echo "
846 846
             <div $restrict>
@@ -864,8 +864,8 @@  discard block
 block discarded – undo
864 864
     /**
865 865
      * Renders the website element template.
866 866
      */
867
-    public function render_website_template( $field ) {
868
-        $restrict = $this->get_restrict_markup( $field, 'website' );
867
+    public function render_website_template($field) {
868
+        $restrict = $this->get_restrict_markup($field, 'website');
869 869
         $label    = "$field.label";
870 870
         echo "
871 871
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -880,16 +880,16 @@  discard block
 block discarded – undo
880 880
     /**
881 881
      * Renders the edit website element template.
882 882
      */
883
-    public function edit_website_template( $field ) {
884
-        $restrict = $this->get_restrict_markup( $field, 'website' );
885
-        $label    = __( 'Field Label', 'invoicing' );
883
+    public function edit_website_template($field) {
884
+        $restrict = $this->get_restrict_markup($field, 'website');
885
+        $label    = __('Field Label', 'invoicing');
886 886
         $id       = $field . '.id + "_edit"';
887
-        $label2   = __( 'Placeholder text', 'invoicing' );
887
+        $label2   = __('Placeholder text', 'invoicing');
888 888
         $id2      = $field . '.id + "_edit2"';
889
-        $label3   = __( 'Help text', 'invoicing' );
890
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
889
+        $label3   = __('Help text', 'invoicing');
890
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
891 891
         $id3      = $field . '.id + "_edit3"';
892
-        $label5   = __( 'Is this field required?', 'invoicing' );
892
+        $label5   = __('Is this field required?', 'invoicing');
893 893
         $id4      = $field . '.id + "_edit4"';
894 894
         echo "
895 895
             <div $restrict>
@@ -917,8 +917,8 @@  discard block
 block discarded – undo
917 917
     /**
918 918
      * Renders the date element template.
919 919
      */
920
-    public function render_date_template( $field ) {
921
-        $restrict = $this->get_restrict_markup( $field, 'date' );
920
+    public function render_date_template($field) {
921
+        $restrict = $this->get_restrict_markup($field, 'date');
922 922
         $label    = "$field.label";
923 923
         echo "
924 924
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -933,14 +933,14 @@  discard block
 block discarded – undo
933 933
     /**
934 934
      * Renders the edit date element template.
935 935
      */
936
-    public function edit_date_template( $field ) {
937
-        $restrict = $this->get_restrict_markup( $field, 'date' );
938
-        $label    = __( 'Field Label', 'invoicing' );
936
+    public function edit_date_template($field) {
937
+        $restrict = $this->get_restrict_markup($field, 'date');
938
+        $label    = __('Field Label', 'invoicing');
939 939
         $id       = $field . '.id + "_edit"';
940
-        $label3   = __( 'Help text', 'invoicing' );
941
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
940
+        $label3   = __('Help text', 'invoicing');
941
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
942 942
         $id3      = $field . '.id + "_edit3"';
943
-        $label5   = __( 'Is this field required?', 'invoicing' );
943
+        $label5   = __('Is this field required?', 'invoicing');
944 944
         $id4      = $field . '.id + "_edit4"';
945 945
         echo "
946 946
             <div $restrict>
@@ -964,8 +964,8 @@  discard block
 block discarded – undo
964 964
     /**
965 965
      * Renders the time element template.
966 966
      */
967
-    public function render_time_template( $field ) {
968
-        $restrict = $this->get_restrict_markup( $field, 'time' );
967
+    public function render_time_template($field) {
968
+        $restrict = $this->get_restrict_markup($field, 'time');
969 969
         $label    = "$field.label";
970 970
         echo "
971 971
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -980,14 +980,14 @@  discard block
 block discarded – undo
980 980
     /**
981 981
      * Renders the edit time element template.
982 982
      */
983
-    public function edit_time_template( $field ) {
984
-        $restrict = $this->get_restrict_markup( $field, 'time' );
985
-        $label    = __( 'Field Label', 'invoicing' );
983
+    public function edit_time_template($field) {
984
+        $restrict = $this->get_restrict_markup($field, 'time');
985
+        $label    = __('Field Label', 'invoicing');
986 986
         $id       = $field . '.id + "_edit"';
987
-        $label3   = __( 'Help text', 'invoicing' );
988
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
987
+        $label3   = __('Help text', 'invoicing');
988
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
989 989
         $id3      = $field . '.id + "_edit3"';
990
-        $label5   = __( 'Is this field required?', 'invoicing' );
990
+        $label5   = __('Is this field required?', 'invoicing');
991 991
         $id4      = $field . '.id + "_edit4"';
992 992
         echo "
993 993
             <div $restrict>
@@ -1011,8 +1011,8 @@  discard block
 block discarded – undo
1011 1011
     /**
1012 1012
      * Renders the number element template.
1013 1013
      */
1014
-    public function render_number_template( $field ) {
1015
-        $restrict = $this->get_restrict_markup( $field, 'number' );
1014
+    public function render_number_template($field) {
1015
+        $restrict = $this->get_restrict_markup($field, 'number');
1016 1016
         $label    = "$field.label";
1017 1017
         echo "
1018 1018
             <div $restrict class='wpinv-payment-form-field-preview'>
@@ -1027,16 +1027,16 @@  discard block
 block discarded – undo
1027 1027
     /**
1028 1028
      * Renders the edit number element template.
1029 1029
      */
1030
-    public function edit_number_template( $field ) {
1031
-        $restrict = $this->get_restrict_markup( $field, 'number' );
1032
-        $label    = __( 'Field Label', 'invoicing' );
1030
+    public function edit_number_template($field) {
1031
+        $restrict = $this->get_restrict_markup($field, 'number');
1032
+        $label    = __('Field Label', 'invoicing');
1033 1033
         $id       = $field . '.id + "_edit"';
1034
-        $label2   = __( 'Placeholder text', 'invoicing' );
1034
+        $label2   = __('Placeholder text', 'invoicing');
1035 1035
         $id2      = $field . '.id + "_edit2"';
1036
-        $label3   = __( 'Help text', 'invoicing' );
1037
-        $label4   = esc_attr__( 'Add some help text for this field', 'invoicing' );
1036
+        $label3   = __('Help text', 'invoicing');
1037
+        $label4   = esc_attr__('Add some help text for this field', 'invoicing');
1038 1038
         $id3      = $field . '.id + "_edit3"';
1039
-        $label5   = __( 'Is this field required?', 'invoicing' );
1039
+        $label5   = __('Is this field required?', 'invoicing');
1040 1040
         $id4      = $field . '.id + "_edit4"';
1041 1041
         echo "
1042 1042
             <div $restrict>
@@ -1064,16 +1064,16 @@  discard block
 block discarded – undo
1064 1064
     /**
1065 1065
      * Renders the separator element template.
1066 1066
      */
1067
-    public function render_separator_template( $field ) {
1068
-        $restrict = $this->get_restrict_markup( $field, 'separator' );
1067
+    public function render_separator_template($field) {
1068
+        $restrict = $this->get_restrict_markup($field, 'separator');
1069 1069
         echo "<hr class='featurette-divider' $restrict>";
1070 1070
     }
1071 1071
 
1072 1072
     /**
1073 1073
      * Renders the pay button element template.
1074 1074
      */
1075
-    public function render_pay_button_template( $field ) {
1076
-        $restrict = $this->get_restrict_markup( $field, 'pay_button' );
1075
+    public function render_pay_button_template($field) {
1076
+        $restrict = $this->get_restrict_markup($field, 'pay_button');
1077 1077
         $label    = "$field.label";
1078 1078
         echo "
1079 1079
             <div $restrict>
@@ -1086,14 +1086,14 @@  discard block
 block discarded – undo
1086 1086
     /**
1087 1087
      * Renders the pay button element template.
1088 1088
      */
1089
-    public function edit_pay_button_template( $field ) {
1090
-        $restrict = $this->get_restrict_markup( $field, 'pay_button' );
1091
-        $label    = __( 'Button Text', 'invoicing' );
1089
+    public function edit_pay_button_template($field) {
1090
+        $restrict = $this->get_restrict_markup($field, 'pay_button');
1091
+        $label    = __('Button Text', 'invoicing');
1092 1092
         $id       = $field . '.id + "_edit"';
1093
-        $label2   = __( 'Help text', 'invoicing' );
1094
-        $label3   = esc_attr__( 'Add some help text for this field', 'invoicing' );
1093
+        $label2   = __('Help text', 'invoicing');
1094
+        $label3   = esc_attr__('Add some help text for this field', 'invoicing');
1095 1095
         $id2      = $field . '.id + "_edit2"';
1096
-        $label4   = esc_attr__( 'Button Type', 'invoicing' );
1096
+        $label4   = esc_attr__('Button Type', 'invoicing');
1097 1097
         $id3      = $field . '.id + "_edit3"';
1098 1098
 
1099 1099
         echo "
@@ -1110,15 +1110,15 @@  discard block
 block discarded – undo
1110 1110
                     <label :for='$id3'>$label4</label>
1111 1111
 
1112 1112
                     <select class='form-control custom-select' :id='$id3' v-model='$field.class'>
1113
-                        <option value='btn-primary'>"   . __( 'Primary', 'invoicing' ) ."</option>
1114
-                        <option value='btn-secondary'>" . __( 'Secondary', 'invoicing' ) ."</option>
1115
-                        <option value='btn-success'>"   . __( 'Success', 'invoicing' ) ."</option>
1116
-                        <option value='btn-danger'>"    . __( 'Danger', 'invoicing' ) ."</option>
1117
-                        <option value='btn-warning'>"   . __( 'Warning', 'invoicing' ) ."</option>
1118
-                        <option value='btn-info'>"      . __( 'Info', 'invoicing' ) ."</option>
1119
-                        <option value='btn-light'>"     . __( 'Light', 'invoicing' ) ."</option>
1120
-                        <option value='btn-dark'>"      . __( 'Dark', 'invoicing' ) ."</option>
1121
-                        <option value='btn-link'>"      . __( 'Link', 'invoicing' ) ."</option>
1113
+                        <option value='btn-primary'>" . __('Primary', 'invoicing') . "</option>
1114
+                        <option value='btn-secondary'>" . __('Secondary', 'invoicing') . "</option>
1115
+                        <option value='btn-success'>"   . __('Success', 'invoicing') . "</option>
1116
+                        <option value='btn-danger'>"    . __('Danger', 'invoicing') . "</option>
1117
+                        <option value='btn-warning'>"   . __('Warning', 'invoicing') . "</option>
1118
+                        <option value='btn-info'>"      . __('Info', 'invoicing') . "</option>
1119
+                        <option value='btn-light'>"     . __('Light', 'invoicing') . "</option>
1120
+                        <option value='btn-dark'>"      . __('Dark', 'invoicing') . "</option>
1121
+                        <option value='btn-link'>"      . __('Link', 'invoicing') . "</option>
1122 1122
                     </select>
1123 1123
                 </div>
1124 1124
             </div>
@@ -1129,8 +1129,8 @@  discard block
 block discarded – undo
1129 1129
     /**
1130 1130
      * Renders the alert element template.
1131 1131
      */
1132
-    public function render_alert_template( $field ) {
1133
-        $restrict = $this->get_restrict_markup( $field, 'alert' );
1132
+    public function render_alert_template($field) {
1133
+        $restrict = $this->get_restrict_markup($field, 'alert');
1134 1134
         $text     = "$field.text";
1135 1135
         echo "
1136 1136
             <div $restrict class='alert' :class='$field.class' role='alert'>
@@ -1145,14 +1145,14 @@  discard block
 block discarded – undo
1145 1145
     /**
1146 1146
      * Renders the alert element template.
1147 1147
      */
1148
-    public function edit_alert_template( $field ) {
1149
-        $restrict = $this->get_restrict_markup( $field, 'alert' );
1150
-        $label    = __( 'Alert Text', 'invoicing' );
1151
-        $label2   = esc_attr__( 'Enter your alert text here', 'invoicing' );
1148
+    public function edit_alert_template($field) {
1149
+        $restrict = $this->get_restrict_markup($field, 'alert');
1150
+        $label    = __('Alert Text', 'invoicing');
1151
+        $label2   = esc_attr__('Enter your alert text here', 'invoicing');
1152 1152
         $id       = $field . '.id + "_edit"';
1153
-        $label3   = __( 'Is Dismissible?', 'invoicing' );
1153
+        $label3   = __('Is Dismissible?', 'invoicing');
1154 1154
         $id2      = $field . '.id + "_edit2"';
1155
-        $label4   = esc_attr__( 'Alert Type', 'invoicing' );
1155
+        $label4   = esc_attr__('Alert Type', 'invoicing');
1156 1156
         $id3      = $field . '.id + "_edit3"';
1157 1157
         echo "
1158 1158
             <div $restrict>
@@ -1168,14 +1168,14 @@  discard block
 block discarded – undo
1168 1168
                     <label :for='$id3'>$label4</label>
1169 1169
 
1170 1170
                     <select class='form-control custom-select' :id='$id3' v-model='$field.class'>
1171
-                        <option value='alert-primary'>"   . __( 'Primary', 'invoicing' ) ."</option>
1172
-                        <option value='alert-secondary'>" . __( 'Secondary', 'invoicing' ) ."</option>
1173
-                        <option value='alert-success'>"   . __( 'Success', 'invoicing' ) ."</option>
1174
-                        <option value='alert-danger'>"    . __( 'Danger', 'invoicing' ) ."</option>
1175
-                        <option value='alert-warning'>"   . __( 'Warning', 'invoicing' ) ."</option>
1176
-                        <option value='alert-info'>"      . __( 'Info', 'invoicing' ) ."</option>
1177
-                        <option value='alert-light'>"     . __( 'Light', 'invoicing' ) ."</option>
1178
-                        <option value='alert-dark'>"      . __( 'Dark', 'invoicing' ) ."</option>
1171
+                        <option value='alert-primary'>" . __('Primary', 'invoicing') . "</option>
1172
+                        <option value='alert-secondary'>" . __('Secondary', 'invoicing') . "</option>
1173
+                        <option value='alert-success'>"   . __('Success', 'invoicing') . "</option>
1174
+                        <option value='alert-danger'>"    . __('Danger', 'invoicing') . "</option>
1175
+                        <option value='alert-warning'>"   . __('Warning', 'invoicing') . "</option>
1176
+                        <option value='alert-info'>"      . __('Info', 'invoicing') . "</option>
1177
+                        <option value='alert-light'>"     . __('Light', 'invoicing') . "</option>
1178
+                        <option value='alert-dark'>"      . __('Dark', 'invoicing') . "</option>
1179 1179
                     </select>
1180 1180
                 </div>
1181 1181
             </div>
@@ -1186,8 +1186,8 @@  discard block
 block discarded – undo
1186 1186
     /**
1187 1187
      * Renders the discount element template.
1188 1188
      */
1189
-    public function render_discount_template( $field ) {
1190
-        $restrict  = $this->get_restrict_markup( $field, 'discount' );
1189
+    public function render_discount_template($field) {
1190
+        $restrict = $this->get_restrict_markup($field, 'discount');
1191 1191
         ?>
1192 1192
 
1193 1193
             <div <?php echo $restrict; ?> class="discount_field border rounded p-3 wpinv-payment-form-field-preview">
@@ -1205,12 +1205,12 @@  discard block
 block discarded – undo
1205 1205
     /**
1206 1206
      * Renders the discount element template.
1207 1207
      */
1208
-    public function edit_discount_template( $field ) {
1209
-        $restrict = $this->get_restrict_markup( $field, 'discount' );
1210
-        $label    = __( 'Discount Input Placeholder', 'invoicing' );
1211
-        $label2   = __( 'Help Text', 'invoicing' );
1212
-        $label3   = esc_attr__( 'Add some help text for this field', 'invoicing' );
1213
-        $label4   = __( 'Button Text', 'invoicing' );
1208
+    public function edit_discount_template($field) {
1209
+        $restrict = $this->get_restrict_markup($field, 'discount');
1210
+        $label    = __('Discount Input Placeholder', 'invoicing');
1211
+        $label2   = __('Help Text', 'invoicing');
1212
+        $label3   = esc_attr__('Add some help text for this field', 'invoicing');
1213
+        $label4   = __('Button Text', 'invoicing');
1214 1214
         $id       = $field . '.id + "_edit"';
1215 1215
         $id2      = $field . '.id + "_edit2"';
1216 1216
         $id3      = $field . '.id + "_edit3"';
@@ -1239,17 +1239,17 @@  discard block
 block discarded – undo
1239 1239
     /**
1240 1240
      * Renders the items element template.
1241 1241
      */
1242
-    public function render_items_template( $field ) {
1243
-        $restrict  = $this->get_restrict_markup( $field, 'items' );
1242
+    public function render_items_template($field) {
1243
+        $restrict = $this->get_restrict_markup($field, 'items');
1244 1244
         ?>
1245 1245
 
1246 1246
         <div <?php echo $restrict; ?> class='item_totals'>
1247 1247
             <div v-if='!is_default'>
1248
-                <div v-if='! canCheckoutSeveralSubscriptions(<?php echo $field; ?>)' class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here. Click to set items.', 'invoicing' ) ?></div>
1249
-                <div v-if='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)' class='alert alert-danger' role='alert'><?php _e( 'Your form allows customers to buy several recurring items. This is not supported and might lead to unexpected behaviour.', 'invoicing' ); ?></div>
1248
+                <div v-if='! canCheckoutSeveralSubscriptions(<?php echo $field; ?>)' class='alert alert-info' role='alert'><?php _e('Item totals will appear here. Click to set items.', 'invoicing') ?></div>
1249
+                <div v-if='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)' class='alert alert-danger' role='alert'><?php _e('Your form allows customers to buy several recurring items. This is not supported and might lead to unexpected behaviour.', 'invoicing'); ?></div>
1250 1250
             </div>
1251 1251
             <div v-if='is_default'>
1252
-                <div class='alert alert-info' role='alert'><?php _e( 'Item totals will appear here.', 'invoicing' ) ?></div>
1252
+                <div class='alert alert-info' role='alert'><?php _e('Item totals will appear here.', 'invoicing') ?></div>
1253 1253
             </div>
1254 1254
         </div>
1255 1255
 
@@ -1259,25 +1259,25 @@  discard block
 block discarded – undo
1259 1259
     /**
1260 1260
      * Renders the items element template.
1261 1261
      */
1262
-    public function edit_items_template( $field ) {
1262
+    public function edit_items_template($field) {
1263 1263
         global $wpinv_euvat, $post;
1264 1264
 
1265
-        $restrict = $this->get_restrict_markup( $field, 'items' );
1265
+        $restrict = $this->get_restrict_markup($field, 'items');
1266 1266
         $id2      = $field . '.id + "_edit2"';
1267 1267
         $id3      = $field . '.id + "_edit3"';
1268 1268
 
1269 1269
         // Item types.
1270
-        $item_types = apply_filters( 'wpinv_item_types_for_quick_add_item', wpinv_get_item_types(), $post );
1270
+        $item_types = apply_filters('wpinv_item_types_for_quick_add_item', wpinv_get_item_types(), $post);
1271 1271
 
1272 1272
         ?>
1273 1273
         <div <?php echo $restrict; ?>>
1274 1274
             <div v-if="!is_default">
1275 1275
                 <label class='form-group'>
1276 1276
                     <input v-model='<?php echo $field; ?>.hide_cart' type='checkbox' />
1277
-                    <span class='form-check-label'><?php _e( 'Hide cart details', 'invoicing' ); ?></span>
1277
+                    <span class='form-check-label'><?php _e('Hide cart details', 'invoicing'); ?></span>
1278 1278
                 </label>
1279 1279
 
1280
-                <div class="mb-1"><?php _e( 'Form Items', 'invoicing' ); ?></div>
1280
+                <div class="mb-1"><?php _e('Form Items', 'invoicing'); ?></div>
1281 1281
                 <draggable v-model='form_items' group='selectable_form_items'>
1282 1282
                     <div class='wpinv-available-items-editor' v-for='(item, index) in form_items' :class="'item_' + item.id" :key="item.id">
1283 1283
 
@@ -1295,35 +1295,35 @@  discard block
 block discarded – undo
1295 1295
 
1296 1296
                                 <div class="form-group" v-if="! item.new">
1297 1297
                                     <span class='form-text'>
1298
-                                        <a target="_blank" :href="'<?php echo esc_url( admin_url( '/post.php?action=edit&post' ) ) ?>=' + item.id">
1299
-                                            <?php _e( 'Edit the item name, price and other details', 'invoicing' ); ?>
1298
+                                        <a target="_blank" :href="'<?php echo esc_url(admin_url('/post.php?action=edit&post')) ?>=' + item.id">
1299
+                                            <?php _e('Edit the item name, price and other details', 'invoicing'); ?>
1300 1300
                                         </a>
1301 1301
                                     </span>
1302 1302
                                 </div>
1303 1303
 
1304 1304
                                 <div class='form-group' v-if="item.new">
1305 1305
                                     <label class='mb-0 w-100'>
1306
-                                        <span><?php _e( 'Item Name', 'invoicing' ); ?></span>
1306
+                                        <span><?php _e('Item Name', 'invoicing'); ?></span>
1307 1307
                                         <input v-model='item.title' type='text' class='w-100'/>
1308 1308
                                     </label>
1309 1309
                                 </div>
1310 1310
 
1311 1311
                                 <div class='form-group'  v-if="item.new">
1312 1312
                                     <label class='mb-0 w-100'>
1313
-                                        <span v-if='!item.custom_price'><?php _e( 'Item Price', 'invoicing' ); ?></span>
1314
-                                        <span v-if='item.custom_price'><?php _e( 'Recommended Price', 'invoicing' ); ?></span>
1313
+                                        <span v-if='!item.custom_price'><?php _e('Item Price', 'invoicing'); ?></span>
1314
+                                        <span v-if='item.custom_price'><?php _e('Recommended Price', 'invoicing'); ?></span>
1315 1315
                                         <input v-model='item.price' type='text' class='w-100'/>
1316 1316
                                     </label>
1317 1317
                                 </div>
1318 1318
 
1319 1319
                                 <div class='form-group' v-if='item.new'>
1320 1320
                                     <label :for="'edit_item_type' + item.id" class='mb-0 w-100'>
1321
-                                        <span><?php _e( 'Item Type', 'invoicing' ); ?></span>
1321
+                                        <span><?php _e('Item Type', 'invoicing'); ?></span>
1322 1322
                                         <select class='w-100' v-model='item.type'>
1323 1323
                                             <?php
1324
-                                                foreach ( $item_types as $type => $_label ) {
1325
-                                                    $type  = esc_attr( $type );
1326
-                                                    $_label = esc_html( $_label );
1324
+                                                foreach ($item_types as $type => $_label) {
1325
+                                                    $type = esc_attr($type);
1326
+                                                    $_label = esc_html($_label);
1327 1327
                                                     echo "<option value='$type'>$_label</type>";
1328 1328
                                                 }
1329 1329
                                             ?>
@@ -1332,71 +1332,71 @@  discard block
 block discarded – undo
1332 1332
                                 </div>
1333 1333
 
1334 1334
                                 <div v-if='item.new'>
1335
-                                    <?php if ( $wpinv_euvat->allow_vat_rules() ) : ?>
1335
+                                    <?php if ($wpinv_euvat->allow_vat_rules()) : ?>
1336 1336
                                         <div class='form-group'>
1337
-                                            <label class='w-100 mb-0'><?php _e( 'VAT Rule', 'invoicing' ) ; ?>
1337
+                                            <label class='w-100 mb-0'><?php _e('VAT Rule', 'invoicing'); ?>
1338 1338
                                                 <select class='w-100' v-model='item.rule'>
1339 1339
                                                     <?php
1340
-                                                        foreach ( $wpinv_euvat->get_rules() as $type => $_label ) {
1341
-                                                            $type  = esc_attr( $type );
1342
-                                                            $_label = esc_html( $_label );
1340
+                                                        foreach ($wpinv_euvat->get_rules() as $type => $_label) {
1341
+                                                            $type = esc_attr($type);
1342
+                                                            $_label = esc_html($_label);
1343 1343
                                                             echo "<option value='$type'>$_label</type>";
1344 1344
                                                         }
1345 1345
                                                     ?>
1346 1346
                                                 </select>
1347 1347
                                             </label>
1348 1348
                                         </div>
1349
-                                    <?php endif;?>
1349
+                                    <?php endif; ?>
1350 1350
 
1351
-                                    <?php if ( $wpinv_euvat->allow_vat_classes() ) : ?>
1351
+                                    <?php if ($wpinv_euvat->allow_vat_classes()) : ?>
1352 1352
                                         <div class='form-group'>
1353
-                                            <label class='w-100 mb-0'><?php _e( 'VAT class', 'invoicing' ) ; ?>
1353
+                                            <label class='w-100 mb-0'><?php _e('VAT class', 'invoicing'); ?>
1354 1354
                                                 <select class='w-100' v-model='item.class'>
1355 1355
                                                     <?php
1356
-                                                        foreach ( $wpinv_euvat->get_all_classes() as $type => $_label ) {
1357
-                                                            $type  = esc_attr( $type );
1358
-                                                            $_label = esc_html( $_label );
1356
+                                                        foreach ($wpinv_euvat->get_all_classes() as $type => $_label) {
1357
+                                                            $type = esc_attr($type);
1358
+                                                            $_label = esc_html($_label);
1359 1359
                                                             echo "<option value='$type'>$_label</type>"; 
1360 1360
                                                         }
1361 1361
                                                     ?>
1362 1362
                                                 </select>
1363 1363
                                             </label>
1364 1364
                                         </div>
1365
-                                    <?php endif;?>
1365
+                                    <?php endif; ?>
1366 1366
                                                         
1367 1367
                                 </div>
1368 1368
 
1369 1369
                                 <label v-if='item.new' class='form-group'>
1370 1370
                                     <input v-model='item.custom_price' type='checkbox' />
1371
-                                    <span class='form-check-label'><?php _e( 'Allow users to pay what they want', 'invoicing' ); ?></span>
1371
+                                    <span class='form-check-label'><?php _e('Allow users to pay what they want', 'invoicing'); ?></span>
1372 1372
                                 </label>
1373 1373
 
1374 1374
                                 <div class='form-group' v-if='item.new && item.custom_price'>
1375 1375
                                     <label class='mb-0 w-100'>
1376
-                                        <span><?php _e( 'Minimum Price', 'invoicing' ); ?></span>
1376
+                                        <span><?php _e('Minimum Price', 'invoicing'); ?></span>
1377 1377
                                         <input placeholder='0.00' v-model='item.minimum_price' class='w-100' />
1378
-                                        <small class='form-text text-muted'><?php _e( 'Enter the minimum price that a user can pay', 'invoicing' ); ?></small>
1378
+                                        <small class='form-text text-muted'><?php _e('Enter the minimum price that a user can pay', 'invoicing'); ?></small>
1379 1379
                                     </label>
1380 1380
                                 </div>
1381 1381
 
1382 1382
                                 <label class='form-group'>
1383 1383
                                     <input v-model='item.allow_quantities' type='checkbox' />
1384
-                                    <span><?php _e( 'Allow users to buy several quantities', 'invoicing' ); ?></span>
1384
+                                    <span><?php _e('Allow users to buy several quantities', 'invoicing'); ?></span>
1385 1385
                                 </label>
1386 1386
 
1387 1387
                                 <label class='form-group'>
1388 1388
                                     <input v-model='item.required' type='checkbox' />
1389
-                                    <span><?php _e( 'This item is required', 'invoicing' ); ?></span>
1389
+                                    <span><?php _e('This item is required', 'invoicing'); ?></span>
1390 1390
                                 </label>
1391 1391
 
1392 1392
                                 <div class='form-group'>
1393 1393
                                     <label class="mb-0 w-100">
1394
-                                        <span><?php _e( 'Item Description', 'invoicing' ); ?></span>
1394
+                                        <span><?php _e('Item Description', 'invoicing'); ?></span>
1395 1395
                                         <textarea v-model='item.description' class='w-100'></textarea>
1396 1396
                                     </label>
1397 1397
                                 </div>
1398 1398
 
1399
-                                    <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e( 'Delete Item', 'invoicing' ); ?></button>
1399
+                                    <button type='button' class='button button-link button-link-delete' @click.prevent='removeItem(item)'><?php _e('Delete Item', 'invoicing'); ?></button>
1400 1400
 
1401 1401
                                 </div>
1402 1402
                             </div>
@@ -1404,36 +1404,36 @@  discard block
 block discarded – undo
1404 1404
                         </div>
1405 1405
                 </draggable>
1406 1406
 
1407
-                <small v-if='! form_items.length' class='form-text text-danger'><?php _e( 'You have not set up any items. Please select an item below or create a new item.', 'invoicing' ); ?></small>
1407
+                <small v-if='! form_items.length' class='form-text text-danger'><?php _e('You have not set up any items. Please select an item below or create a new item.', 'invoicing'); ?></small>
1408 1408
 
1409 1409
                 <div class='form-group mt-2'>
1410 1410
 
1411 1411
                     <select class='w-100' style="padding: 6px 24px 6px 8px; border-color: #e0e0e0;" v-model='selected_item' @change='addSelectedItem'>
1412
-                        <option value=''><?php _e( 'Select an item to add...', 'invoicing' ) ?></option>
1412
+                        <option value=''><?php _e('Select an item to add...', 'invoicing') ?></option>
1413 1413
                         <option v-for='(item, index) in all_items' :value='index'>{{item.title}}</option>
1414 1414
                     </select>
1415 1415
 
1416 1416
                 </div>
1417 1417
 
1418 1418
                 <div class='form-group'>
1419
-                    <button @click.prevent='addNewItem' class="button button-link"><?php _e( 'Or create a new item.', 'invoicing' ) ?></button>
1419
+                    <button @click.prevent='addNewItem' class="button button-link"><?php _e('Or create a new item.', 'invoicing') ?></button>
1420 1420
                 </div>
1421 1421
 
1422 1422
                 <div class='form-group mt-5'>
1423
-                    <label :for='<?php echo $id2; ?>'><?php _e( 'Let customers...', 'invoicing' ) ?></label>
1423
+                    <label :for='<?php echo $id2; ?>'><?php _e('Let customers...', 'invoicing') ?></label>
1424 1424
 
1425 1425
                     <select class='w-100' style="padding: 6px 24px 6px 8px; border-color: #e0e0e0;" :id='<?php echo $id2; ?>' v-model='<?php echo $field; ?>.items_type'>
1426
-                        <option value='total' :disabled='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)'><?php _e( 'Buy all items on the list', 'invoicing' ); ?></option>
1427
-                        <option value='radio'><?php _e( 'Select a single item from the list', 'invoicing' ); ?></option>
1428
-                        <option value='checkbox' :disabled='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)'><?php _e( 'Select one or more items on the list', 'invoicing' ) ;?></option>
1429
-                        <option value='select'><?php _e( 'Select a single item from a dropdown', 'invoicing' ); ?></option>
1426
+                        <option value='total' :disabled='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)'><?php _e('Buy all items on the list', 'invoicing'); ?></option>
1427
+                        <option value='radio'><?php _e('Select a single item from the list', 'invoicing'); ?></option>
1428
+                        <option value='checkbox' :disabled='canCheckoutSeveralSubscriptions(<?php echo $field; ?>)'><?php _e('Select one or more items on the list', 'invoicing'); ?></option>
1429
+                        <option value='select'><?php _e('Select a single item from a dropdown', 'invoicing'); ?></option>
1430 1430
                     </select>
1431 1431
 
1432 1432
                 </div>
1433 1433
             </div>
1434 1434
             <div class='form-group'>
1435
-                <label :for='<?php echo $id3; ?>'><?php _e( 'Help Text', 'invoicing' ); ?></label>
1436
-                <textarea placeholder='<?php esc_attr_e( 'Add some help text for this element', 'invoicing' ); ?>' :id='<?php echo $id3; ?>' v-model='<?php echo $field; ?>.description' class='form-control' rows='3'></textarea>
1435
+                <label :for='<?php echo $id3; ?>'><?php _e('Help Text', 'invoicing'); ?></label>
1436
+                <textarea placeholder='<?php esc_attr_e('Add some help text for this element', 'invoicing'); ?>' :id='<?php echo $id3; ?>' v-model='<?php echo $field; ?>.description' class='form-control' rows='3'></textarea>
1437 1437
             </div>
1438 1438
 
1439 1439
         </div>
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
             'orderby'        => 'title',
1453 1453
             'order'          => 'ASC',
1454 1454
             'posts_per_page' => -1,
1455
-            'post_status'    => array( 'publish' ),
1455
+            'post_status'    => array('publish'),
1456 1456
             'meta_query'     => array(
1457 1457
                 array(
1458 1458
                     'key'       => '_wpinv_type',
@@ -1462,15 +1462,15 @@  discard block
 block discarded – undo
1462 1462
             )
1463 1463
         );
1464 1464
 
1465
-        $items = get_posts( apply_filters( 'getpaid_payment_form_item_dropdown_query_args', $item_args ) );
1465
+        $items = get_posts(apply_filters('getpaid_payment_form_item_dropdown_query_args', $item_args));
1466 1466
 
1467
-        if ( empty( $items ) ) {
1467
+        if (empty($items)) {
1468 1468
             return array();
1469 1469
         }
1470 1470
 
1471
-        $options    = array();
1472
-        foreach ( $items as $item ) {
1473
-            $item      = new GetPaid_Form_Item( $item );
1471
+        $options = array();
1472
+        foreach ($items as $item) {
1473
+            $item      = new GetPaid_Form_Item($item);
1474 1474
             $options[] = $item->prepare_data_for_use();
1475 1475
         }
1476 1476
         return $options;
@@ -1480,39 +1480,39 @@  discard block
 block discarded – undo
1480 1480
     /**
1481 1481
      * Returns an array of items for the currently being edited form.
1482 1482
      */
1483
-    public function get_form_items( $id = false ) {
1484
-        $form = new GetPaid_Payment_Form( $id );
1483
+    public function get_form_items($id = false) {
1484
+        $form = new GetPaid_Payment_Form($id);
1485 1485
 
1486 1486
         // Is this a default form?
1487
-        if ( $form->is_default() ) {
1487
+        if ($form->is_default()) {
1488 1488
             return array();
1489 1489
         }
1490 1490
 
1491
-        return $form->get_items( 'view', 'arrays' );
1491
+        return $form->get_items('view', 'arrays');
1492 1492
     }
1493 1493
 
1494 1494
     /**
1495 1495
      * Converts form items for use.
1496 1496
      */
1497
-    public function convert_checkout_items( $items, $invoice ) {
1497
+    public function convert_checkout_items($items, $invoice) {
1498 1498
 
1499 1499
         $converted = array();
1500
-        foreach ( $items as $item ) {
1500
+        foreach ($items as $item) {
1501 1501
 
1502 1502
             $item_id = $item['id'];
1503
-            $_item   = new WPInv_Item( $item_id );
1503
+            $_item   = new WPInv_Item($item_id);
1504 1504
 
1505
-            if( ! $_item ) {
1505
+            if (!$_item) {
1506 1506
                 continue;
1507 1507
             }
1508 1508
 
1509 1509
             $converted[] = array(
1510
-                'title'            => esc_html( wpinv_get_cart_item_name( $item ) ) . wpinv_get_item_suffix( $_item ),
1510
+                'title'            => esc_html(wpinv_get_cart_item_name($item)) . wpinv_get_item_suffix($_item),
1511 1511
                 'id'               => $item['id'],
1512 1512
                 'price'            => $item['subtotal'],
1513 1513
                 'custom_price'     => $_item->get_is_dynamic_pricing(),
1514 1514
                 'recurring'        => $_item->is_recurring(),
1515
-                'description'      => apply_filters( 'wpinv_checkout_cart_line_item_summary', '', $item, $_item, $invoice ),
1515
+                'description'      => apply_filters('wpinv_checkout_cart_line_item_summary', '', $item, $_item, $invoice),
1516 1516
                 'minimum_price'    => $_item->get_minimum_price(),
1517 1517
                 'allow_quantities' => false,
1518 1518
                 'quantity'         => $item['quantity'],
@@ -1526,27 +1526,27 @@  discard block
 block discarded – undo
1526 1526
     /**
1527 1527
      * Converts an array of id => quantity for use.
1528 1528
      */
1529
-    public function convert_normal_items( $items ) {
1529
+    public function convert_normal_items($items) {
1530 1530
 
1531 1531
         $converted = array();
1532
-        foreach ( $items as $item_id => $quantity ) {
1532
+        foreach ($items as $item_id => $quantity) {
1533 1533
 
1534
-            $item   = new WPInv_Item( $item_id );
1534
+            $item = new WPInv_Item($item_id);
1535 1535
 
1536
-            if( ! $item ) {
1536
+            if (!$item) {
1537 1537
                 continue;
1538 1538
             }
1539 1539
 
1540 1540
             $converted[] = array(
1541
-                'title'            => esc_html( $item->get_name() ) . wpinv_get_item_suffix( $item ),
1541
+                'title'            => esc_html($item->get_name()) . wpinv_get_item_suffix($item),
1542 1542
                 'id'               => $item_id,
1543 1543
                 'price'            => $item->get_price(),
1544 1544
                 'custom_price'     => $item->get_is_dynamic_pricing(),
1545 1545
                 'recurring'        => $item->is_recurring(),
1546 1546
                 'description'      => $item->get_summary(),
1547 1547
                 'minimum_price'    => $item->get_minimum_price(),
1548
-                'allow_quantities' => ! empty( $quantity ),
1549
-                'quantity'         => empty( $quantity ) ? 1 : $quantity,
1548
+                'allow_quantities' => !empty($quantity),
1549
+                'quantity'         => empty($quantity) ? 1 : $quantity,
1550 1550
                 'required'         => true,
1551 1551
             );
1552 1552
 
@@ -1559,19 +1559,19 @@  discard block
 block discarded – undo
1559 1559
     /**
1560 1560
      * Returns an array of elements for the currently being edited form.
1561 1561
      */
1562
-    public function get_form_elements( $id = false ) {
1562
+    public function get_form_elements($id = false) {
1563 1563
 
1564
-        if ( empty( $id ) ) {
1565
-            return wpinv_get_data( 'sample-payment-form' );
1564
+        if (empty($id)) {
1565
+            return wpinv_get_data('sample-payment-form');
1566 1566
         }
1567 1567
         
1568
-        $form_elements = get_post_meta( $id, 'wpinv_form_elements', true );
1568
+        $form_elements = get_post_meta($id, 'wpinv_form_elements', true);
1569 1569
 
1570
-        if ( is_array( $form_elements ) ) {
1570
+        if (is_array($form_elements)) {
1571 1571
             return $form_elements;
1572 1572
         }
1573 1573
 
1574
-        return wpinv_get_data( 'sample-payment-form' );
1574
+        return wpinv_get_data('sample-payment-form');
1575 1575
     }
1576 1576
 
1577 1577
 }
Please login to merge, or discard this patch.