Passed
Push — master ( 31f474...7d7341 )
by Kiran
10:27 queued 05:04
created
includes/class-wpinv-legacy-invoice.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -775,10 +775,10 @@  discard block
 block discarded – undo
775 775
         $allowed_fee_keys = apply_filters(
776 776
             'wpinv_fee_keys',
777 777
             array(
778
-				'index',
779
-				'label',
780
-				'amount',
781
-				'type',
778
+                'index',
779
+                'label',
780
+                'amount',
781
+                'type',
782 782
             )
783 783
         );
784 784
 
@@ -850,19 +850,19 @@  discard block
 block discarded – undo
850 850
         $note_id = wp_insert_comment(
851 851
             wp_filter_comment(
852 852
                 array(
853
-					'comment_post_ID'      => $this->ID,
854
-					'comment_content'      => $note,
855
-					'comment_agent'        => 'WPInvoicing',
856
-					'user_id'              => is_admin() ? get_current_user_id() : 0,
857
-					'comment_date'         => current_time( 'mysql' ),
858
-					'comment_date_gmt'     => current_time( 'mysql', 1 ),
859
-					'comment_approved'     => 1,
860
-					'comment_parent'       => 0,
861
-					'comment_author'       => $comment_author,
862
-					'comment_author_IP'    => wpinv_get_ip(),
863
-					'comment_author_url'   => '',
864
-					'comment_author_email' => $comment_author_email,
865
-					'comment_type'         => 'wpinv_note',
853
+                    'comment_post_ID'      => $this->ID,
854
+                    'comment_content'      => $note,
855
+                    'comment_agent'        => 'WPInvoicing',
856
+                    'user_id'              => is_admin() ? get_current_user_id() : 0,
857
+                    'comment_date'         => current_time( 'mysql' ),
858
+                    'comment_date_gmt'     => current_time( 'mysql', 1 ),
859
+                    'comment_approved'     => 1,
860
+                    'comment_parent'       => 0,
861
+                    'comment_author'       => $comment_author,
862
+                    'comment_author_IP'    => wpinv_get_ip(),
863
+                    'comment_author_url'   => '',
864
+                    'comment_author_email' => $comment_author_email,
865
+                    'comment_type'         => 'wpinv_note',
866 866
                 )
867 867
             )
868 868
         );
@@ -875,8 +875,8 @@  discard block
 block discarded – undo
875 875
             do_action(
876 876
                 'wpinv_new_customer_note',
877 877
                 array(
878
-					'invoice_id' => $this->ID,
879
-					'user_note'  => $note,
878
+                    'invoice_id' => $this->ID,
879
+                    'user_note'  => $note,
880 880
                 )
881 881
             );
882 882
         }
Please login to merge, or discard this patch.
Spacing   +292 added lines, -292 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 // MUST have WordPress.
10
-if ( ! defined( 'WPINC' ) ) {
10
+if (!defined('WPINC')) {
11 11
     exit;
12 12
 }
13 13
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * Invoice id.
21 21
      */
22
-    public $ID  = 0;
22
+    public $ID = 0;
23 23
 
24 24
     /**
25 25
      * The title of the invoice. Usually the invoice number.
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     /**
136 136
      * The invoice status.
137 137
      */
138
-    public $status      = 'wpi-pending';
138
+    public $status = 'wpi-pending';
139 139
 
140 140
     /**
141 141
      * Same as self::$status.
@@ -262,17 +262,17 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public $parent_invoice = 0;
264 264
 
265
-    public function __construct( $invoice_id = false ) {
266
-        if ( empty( $invoice_id ) ) {
265
+    public function __construct($invoice_id = false) {
266
+        if (empty($invoice_id)) {
267 267
             return false;
268 268
         }
269 269
 
270
-        $this->setup_invoice( $invoice_id );
270
+        $this->setup_invoice($invoice_id);
271 271
     }
272 272
 
273
-    public function get( $key ) {
274
-        if ( method_exists( $this, 'get_' . $key ) ) {
275
-            $value = call_user_func( array( $this, 'get_' . $key ) );
273
+    public function get($key) {
274
+        if (method_exists($this, 'get_' . $key)) {
275
+            $value = call_user_func(array($this, 'get_' . $key));
276 276
         } else {
277 277
             $value = $this->$key;
278 278
         }
@@ -280,43 +280,43 @@  discard block
 block discarded – undo
280 280
         return $value;
281 281
     }
282 282
 
283
-    public function set( $key, $value ) {
284
-        $ignore = array( 'items', 'cart_details', 'fees', '_ID' );
283
+    public function set($key, $value) {
284
+        $ignore = array('items', 'cart_details', 'fees', '_ID');
285 285
 
286
-        if ( $key === 'status' ) {
286
+        if ($key === 'status') {
287 287
             $this->old_status = $this->status;
288 288
         }
289 289
 
290
-        if ( ! in_array( $key, $ignore ) ) {
291
-            $this->pending[ $key ] = $value;
290
+        if (!in_array($key, $ignore)) {
291
+            $this->pending[$key] = $value;
292 292
         }
293 293
 
294
-        if ( '_ID' !== $key ) {
294
+        if ('_ID' !== $key) {
295 295
             $this->$key = $value;
296 296
         }
297 297
     }
298 298
 
299
-    public function _isset( $name ) {
300
-        if ( property_exists( $this, $name ) ) {
301
-            return false === empty( $this->$name );
299
+    public function _isset($name) {
300
+        if (property_exists($this, $name)) {
301
+            return false === empty($this->$name);
302 302
         } else {
303 303
             return null;
304 304
         }
305 305
     }
306 306
 
307
-    private function setup_invoice( $invoice_id ) {
307
+    private function setup_invoice($invoice_id) {
308 308
         $this->pending = array();
309 309
 
310
-        $invoice = get_post( $invoice_id );
310
+        $invoice = get_post($invoice_id);
311 311
 
312
-        if ( ! $invoice || is_wp_error( $invoice ) ) {
312
+        if (!$invoice || is_wp_error($invoice)) {
313 313
             return false;
314 314
         }
315 315
 
316
-        do_action( 'wpinv_pre_setup_invoice', $this, $invoice_id );
316
+        do_action('wpinv_pre_setup_invoice', $this, $invoice_id);
317 317
 
318 318
         // Primary Identifier
319
-        $this->ID              = absint( $invoice_id );
319
+        $this->ID              = absint($invoice_id);
320 320
         $this->post_type       = $invoice->post_type;
321 321
 
322 322
         // We have a payment, get the generic payment_meta item to reduce calls to it
@@ -326,15 +326,15 @@  discard block
 block discarded – undo
326 326
         $this->completed_date  = $this->setup_completed_date();
327 327
         $this->status          = $invoice->post_status;
328 328
 
329
-        if ( 'future' == $this->status ) {
329
+        if ('future' == $this->status) {
330 330
             $this->status = 'publish';
331 331
         }
332 332
 
333 333
         $this->post_status     = $this->status;
334 334
         $this->mode            = $this->setup_mode();
335 335
         $this->parent_invoice  = $invoice->post_parent;
336
-        $this->post_name       = $this->setup_post_name( $invoice );
337
-        $this->status_nicename = $this->setup_status_nicename( $invoice->post_status );
336
+        $this->post_name       = $this->setup_post_name($invoice);
337
+        $this->status_nicename = $this->setup_status_nicename($invoice->post_status);
338 338
 
339 339
         // Items
340 340
         $this->fees            = $this->setup_fees();
@@ -356,8 +356,8 @@  discard block
 block discarded – undo
356 356
 
357 357
         // User based
358 358
         $this->ip              = $this->setup_ip();
359
-        $this->user_id         = ! empty( $invoice->post_author ) ? $invoice->post_author : get_current_user_id();///$this->setup_user_id();
360
-        $this->email           = get_the_author_meta( 'email', $this->user_id );
359
+        $this->user_id         = !empty($invoice->post_author) ? $invoice->post_author : get_current_user_id(); ///$this->setup_user_id();
360
+        $this->email           = get_the_author_meta('email', $this->user_id);
361 361
 
362 362
         $this->user_info       = $this->setup_user_info();
363 363
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
         $this->company         = $this->user_info['company'];
367 367
         $this->vat_number      = $this->user_info['vat_number'];
368 368
         $this->vat_rate        = $this->user_info['vat_rate'];
369
-        $this->adddress_confirmed  = $this->user_info['adddress_confirmed'];
369
+        $this->adddress_confirmed = $this->user_info['adddress_confirmed'];
370 370
         $this->address         = $this->user_info['address'];
371 371
         $this->city            = $this->user_info['city'];
372 372
         $this->country         = $this->user_info['country'];
@@ -381,31 +381,31 @@  discard block
 block discarded – undo
381 381
         // Other Identifiers
382 382
         $this->key             = $this->setup_invoice_key();
383 383
         $this->number          = $this->setup_invoice_number();
384
-        $this->title           = ! empty( $invoice->post_title ) ? $invoice->post_title : $this->number;
384
+        $this->title           = !empty($invoice->post_title) ? $invoice->post_title : $this->number;
385 385
 
386
-        $this->full_name       = trim( $this->first_name . ' ' . $this->last_name );
386
+        $this->full_name       = trim($this->first_name . ' ' . $this->last_name);
387 387
 
388 388
         // Allow extensions to add items to this object via hook
389
-        do_action( 'wpinv_setup_invoice', $this, $invoice_id );
389
+        do_action('wpinv_setup_invoice', $this, $invoice_id);
390 390
 
391 391
         return true;
392 392
     }
393 393
 
394
-    private function setup_status_nicename( $status ) {
394
+    private function setup_status_nicename($status) {
395 395
         return $status;
396 396
     }
397 397
 
398
-    private function setup_post_name( $post ) {
398
+    private function setup_post_name($post) {
399 399
         $this->post_name = $post->post_name;
400 400
     }
401 401
 
402 402
     private function setup_due_date() {
403
-        $due_date = $this->get_meta( '_wpinv_due_date' );
403
+        $due_date = $this->get_meta('_wpinv_due_date');
404 404
 
405
-        if ( empty( $due_date ) ) {
406
-            $overdue_time = strtotime( $this->date ) + ( DAY_IN_SECONDS * absint( wpinv_get_option( 'overdue_days', 0 ) ) );
407
-            $due_date = date_i18n( 'Y-m-d', $overdue_time );
408
-        } elseif ( $due_date == 'none' ) {
405
+        if (empty($due_date)) {
406
+            $overdue_time = strtotime($this->date) + (DAY_IN_SECONDS * absint(wpinv_get_option('overdue_days', 0)));
407
+            $due_date = date_i18n('Y-m-d', $overdue_time);
408
+        } elseif ($due_date == 'none') {
409 409
             $due_date = '';
410 410
         }
411 411
 
@@ -413,67 +413,67 @@  discard block
 block discarded – undo
413 413
     }
414 414
 
415 415
     private function setup_completed_date() {
416
-        $invoice = get_post( $this->ID );
416
+        $invoice = get_post($this->ID);
417 417
 
418
-        if ( 'wpi-pending' == $invoice->post_status || 'preapproved' == $invoice->post_status ) {
418
+        if ('wpi-pending' == $invoice->post_status || 'preapproved' == $invoice->post_status) {
419 419
             return false; // This invoice was never paid
420 420
         }
421 421
 
422
-        $date = ( $date = $this->get_meta( '_wpinv_completed_date', true ) ) ? $date : $invoice->modified_date;
422
+        $date = ($date = $this->get_meta('_wpinv_completed_date', true)) ? $date : $invoice->modified_date;
423 423
 
424 424
         return $date;
425 425
     }
426 426
 
427 427
     private function setup_cart_details() {
428
-        $cart_details = isset( $this->payment_meta['cart_details'] ) ? maybe_unserialize( $this->payment_meta['cart_details'] ) : array();
428
+        $cart_details = isset($this->payment_meta['cart_details']) ? maybe_unserialize($this->payment_meta['cart_details']) : array();
429 429
         return $cart_details;
430 430
     }
431 431
 
432 432
     public function array_convert() {
433
-        return get_object_vars( $this );
433
+        return get_object_vars($this);
434 434
     }
435 435
 
436 436
     private function setup_items() {
437
-        $items = isset( $this->payment_meta['items'] ) ? maybe_unserialize( $this->payment_meta['items'] ) : array();
437
+        $items = isset($this->payment_meta['items']) ? maybe_unserialize($this->payment_meta['items']) : array();
438 438
         return $items;
439 439
     }
440 440
 
441 441
     private function setup_fees() {
442
-        $payment_fees = isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
442
+        $payment_fees = isset($this->payment_meta['fees']) ? $this->payment_meta['fees'] : array();
443 443
         return $payment_fees;
444 444
     }
445 445
 
446 446
     private function setup_currency() {
447
-        $currency = isset( $this->payment_meta['currency'] ) ? $this->payment_meta['currency'] : apply_filters( 'wpinv_currency_default', wpinv_get_currency(), $this );
447
+        $currency = isset($this->payment_meta['currency']) ? $this->payment_meta['currency'] : apply_filters('wpinv_currency_default', wpinv_get_currency(), $this);
448 448
         return $currency;
449 449
     }
450 450
 
451 451
     private function setup_discount() {
452 452
         //$discount = $this->get_meta( '_wpinv_discount', true );
453
-        $discount = (float)$this->subtotal - ( (float)$this->total - (float)$this->tax - (float)$this->fees_total );
454
-        if ( $discount < 0 ) {
453
+        $discount = (float) $this->subtotal - ((float) $this->total - (float) $this->tax - (float) $this->fees_total);
454
+        if ($discount < 0) {
455 455
             $discount = 0;
456 456
         }
457
-        $discount = wpinv_round_amount( $discount );
457
+        $discount = wpinv_round_amount($discount);
458 458
 
459 459
         return $discount;
460 460
     }
461 461
 
462 462
     private function setup_discount_code() {
463
-        $discount_code = ! empty( $this->discounts ) ? $this->discounts : $this->get_meta( '_wpinv_discount_code', true );
463
+        $discount_code = !empty($this->discounts) ? $this->discounts : $this->get_meta('_wpinv_discount_code', true);
464 464
         return $discount_code;
465 465
     }
466 466
 
467 467
     private function setup_tax() {
468 468
 
469
-        $tax = $this->get_meta( '_wpinv_tax', true );
469
+        $tax = $this->get_meta('_wpinv_tax', true);
470 470
 
471 471
         // We don't have tax as it's own meta and no meta was passed
472
-        if ( '' === $tax ) {
473
-            $tax = isset( $this->payment_meta['tax'] ) ? $this->payment_meta['tax'] : 0;
472
+        if ('' === $tax) {
473
+            $tax = isset($this->payment_meta['tax']) ? $this->payment_meta['tax'] : 0;
474 474
         }
475 475
 
476
-        if ( $tax < 0 || ! $this->is_taxable() ) {
476
+        if ($tax < 0 || !$this->is_taxable()) {
477 477
             $tax = 0;
478 478
         }
479 479
 
@@ -484,16 +484,16 @@  discard block
 block discarded – undo
484 484
      * If taxes are enabled, allow users to enable/disable taxes per invoice.
485 485
      */
486 486
     private function setup_is_taxable() {
487
-        return (int) $this->get_meta( '_wpinv_disable_taxes', true );
487
+        return (int) $this->get_meta('_wpinv_disable_taxes', true);
488 488
     }
489 489
 
490 490
     private function setup_subtotal() {
491 491
         $subtotal     = 0;
492 492
         $cart_details = $this->cart_details;
493 493
 
494
-        if ( is_array( $cart_details ) ) {
495
-            foreach ( $cart_details as $item ) {
496
-                if ( isset( $item['subtotal'] ) ) {
494
+        if (is_array($cart_details)) {
495
+            foreach ($cart_details as $item) {
496
+                if (isset($item['subtotal'])) {
497 497
                     $subtotal += $item['subtotal'];
498 498
                 }
499 499
             }
@@ -507,23 +507,23 @@  discard block
 block discarded – undo
507 507
     }
508 508
 
509 509
     private function setup_discounts() {
510
-        $discounts = ! empty( $this->payment_meta['user_info']['discount'] ) ? $this->payment_meta['user_info']['discount'] : array();
510
+        $discounts = !empty($this->payment_meta['user_info']['discount']) ? $this->payment_meta['user_info']['discount'] : array();
511 511
         return $discounts;
512 512
     }
513 513
 
514 514
     private function setup_total() {
515
-        $amount = $this->get_meta( '_wpinv_total', true );
515
+        $amount = $this->get_meta('_wpinv_total', true);
516 516
 
517
-        if ( empty( $amount ) && '0.00' != $amount ) {
518
-            $meta   = $this->get_meta( '_wpinv_payment_meta', true );
519
-            $meta   = maybe_unserialize( $meta );
517
+        if (empty($amount) && '0.00' != $amount) {
518
+            $meta   = $this->get_meta('_wpinv_payment_meta', true);
519
+            $meta   = maybe_unserialize($meta);
520 520
 
521
-            if ( isset( $meta['amount'] ) ) {
521
+            if (isset($meta['amount'])) {
522 522
                 $amount = $meta['amount'];
523 523
             }
524 524
         }
525 525
 
526
-        if ( $amount < 0 ) {
526
+        if ($amount < 0) {
527 527
             $amount = 0;
528 528
         }
529 529
 
@@ -531,13 +531,13 @@  discard block
 block discarded – undo
531 531
     }
532 532
 
533 533
     private function setup_mode() {
534
-        return $this->get_meta( '_wpinv_mode' );
534
+        return $this->get_meta('_wpinv_mode');
535 535
     }
536 536
 
537 537
     private function setup_gateway() {
538
-        $gateway = $this->get_meta( '_wpinv_gateway' );
538
+        $gateway = $this->get_meta('_wpinv_gateway');
539 539
 
540
-        if ( empty( $gateway ) && 'publish' === $this->status ) {
540
+        if (empty($gateway) && 'publish' === $this->status) {
541 541
             $gateway = 'manual';
542 542
         }
543 543
 
@@ -545,23 +545,23 @@  discard block
 block discarded – undo
545 545
     }
546 546
 
547 547
     private function setup_gateway_title() {
548
-        $gateway_title = wpinv_get_gateway_checkout_label( $this->gateway );
548
+        $gateway_title = wpinv_get_gateway_checkout_label($this->gateway);
549 549
         return $gateway_title;
550 550
     }
551 551
 
552 552
     private function setup_transaction_id() {
553
-        $transaction_id = $this->get_meta( '_wpinv_transaction_id' );
553
+        $transaction_id = $this->get_meta('_wpinv_transaction_id');
554 554
 
555
-        if ( empty( $transaction_id ) || (int) $transaction_id === (int) $this->ID ) {
555
+        if (empty($transaction_id) || (int) $transaction_id === (int) $this->ID) {
556 556
             $gateway        = $this->gateway;
557
-            $transaction_id = apply_filters( 'wpinv_get_invoice_transaction_id-' . $gateway, $this->ID );
557
+            $transaction_id = apply_filters('wpinv_get_invoice_transaction_id-' . $gateway, $this->ID);
558 558
         }
559 559
 
560 560
         return $transaction_id;
561 561
     }
562 562
 
563 563
     private function setup_ip() {
564
-        $ip = $this->get_meta( '_wpinv_user_ip' );
564
+        $ip = $this->get_meta('_wpinv_user_ip');
565 565
         return $ip;
566 566
     }
567 567
 
@@ -571,62 +571,62 @@  discard block
 block discarded – undo
571 571
     ///}
572 572
 
573 573
     private function setup_first_name() {
574
-        $first_name = $this->get_meta( '_wpinv_first_name' );
574
+        $first_name = $this->get_meta('_wpinv_first_name');
575 575
         return $first_name;
576 576
     }
577 577
 
578 578
     private function setup_last_name() {
579
-        $last_name = $this->get_meta( '_wpinv_last_name' );
579
+        $last_name = $this->get_meta('_wpinv_last_name');
580 580
         return $last_name;
581 581
     }
582 582
 
583 583
     private function setup_company() {
584
-        $company = $this->get_meta( '_wpinv_company' );
584
+        $company = $this->get_meta('_wpinv_company');
585 585
         return $company;
586 586
     }
587 587
 
588 588
     private function setup_vat_number() {
589
-        $vat_number = $this->get_meta( '_wpinv_vat_number' );
589
+        $vat_number = $this->get_meta('_wpinv_vat_number');
590 590
         return $vat_number;
591 591
     }
592 592
 
593 593
     private function setup_vat_rate() {
594
-        $vat_rate = $this->get_meta( '_wpinv_vat_rate' );
594
+        $vat_rate = $this->get_meta('_wpinv_vat_rate');
595 595
         return $vat_rate;
596 596
     }
597 597
 
598 598
     private function setup_adddress_confirmed() {
599
-        $adddress_confirmed = $this->get_meta( '_wpinv_adddress_confirmed' );
599
+        $adddress_confirmed = $this->get_meta('_wpinv_adddress_confirmed');
600 600
         return $adddress_confirmed;
601 601
     }
602 602
 
603 603
     private function setup_phone() {
604
-        $phone = $this->get_meta( '_wpinv_phone' );
604
+        $phone = $this->get_meta('_wpinv_phone');
605 605
         return $phone;
606 606
     }
607 607
 
608 608
     private function setup_address() {
609
-        $address = $this->get_meta( '_wpinv_address', true );
609
+        $address = $this->get_meta('_wpinv_address', true);
610 610
         return $address;
611 611
     }
612 612
 
613 613
     private function setup_city() {
614
-        $city = $this->get_meta( '_wpinv_city', true );
614
+        $city = $this->get_meta('_wpinv_city', true);
615 615
         return $city;
616 616
     }
617 617
 
618 618
     private function setup_country() {
619
-        $country = $this->get_meta( '_wpinv_country', true );
619
+        $country = $this->get_meta('_wpinv_country', true);
620 620
         return $country;
621 621
     }
622 622
 
623 623
     private function setup_state() {
624
-        $state = $this->get_meta( '_wpinv_state', true );
624
+        $state = $this->get_meta('_wpinv_state', true);
625 625
         return $state;
626 626
     }
627 627
 
628 628
     private function setup_zip() {
629
-        $zip = $this->get_meta( '_wpinv_zip', true );
629
+        $zip = $this->get_meta('_wpinv_zip', true);
630 630
         return $zip;
631 631
     }
632 632
 
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
             'user_id'            => $this->user_id,
636 636
             'first_name'         => $this->first_name,
637 637
             'last_name'          => $this->last_name,
638
-            'email'              => get_the_author_meta( 'email', $this->user_id ),
638
+            'email'              => get_the_author_meta('email', $this->user_id),
639 639
             'phone'              => $this->phone,
640 640
             'address'            => $this->address,
641 641
             'city'               => $this->city,
@@ -650,12 +650,12 @@  discard block
 block discarded – undo
650 650
         );
651 651
 
652 652
         $user_info = array();
653
-        if ( isset( $this->payment_meta['user_info'] ) ) {
654
-            $user_info = maybe_unserialize( $this->payment_meta['user_info'] );
653
+        if (isset($this->payment_meta['user_info'])) {
654
+            $user_info = maybe_unserialize($this->payment_meta['user_info']);
655 655
 
656
-            if ( ! empty( $user_info ) && isset( $user_info['user_id'] ) && $post = get_post( $this->ID ) ) {
656
+            if (!empty($user_info) && isset($user_info['user_id']) && $post = get_post($this->ID)) {
657 657
                 $this->user_id = $post->post_author;
658
-                $this->email = get_the_author_meta( 'email', $this->user_id );
658
+                $this->email = get_the_author_meta('email', $this->user_id);
659 659
 
660 660
                 $user_info['user_id'] = $this->user_id;
661 661
                 $user_info['email'] = $this->email;
@@ -664,13 +664,13 @@  discard block
 block discarded – undo
664 664
             }
665 665
         }
666 666
 
667
-        $user_info    = wp_parse_args( $user_info, $defaults );
667
+        $user_info = wp_parse_args($user_info, $defaults);
668 668
 
669 669
         // Get the user, but only if it's been created
670
-        $user = get_userdata( $this->user_id );
670
+        $user = get_userdata($this->user_id);
671 671
 
672
-        if ( ! empty( $user ) && $user->ID > 0 ) {
673
-            if ( empty( $user_info ) ) {
672
+        if (!empty($user) && $user->ID > 0) {
673
+            if (empty($user_info)) {
674 674
                 $user_info = array(
675 675
                     'user_id'    => $user->ID,
676 676
                     'first_name' => $user->first_name,
@@ -679,23 +679,23 @@  discard block
 block discarded – undo
679 679
                     'discount'   => '',
680 680
                 );
681 681
             } else {
682
-                foreach ( $user_info as $key => $value ) {
683
-                    if ( ! empty( $value ) ) {
682
+                foreach ($user_info as $key => $value) {
683
+                    if (!empty($value)) {
684 684
                         continue;
685 685
                     }
686 686
 
687
-                    switch ( $key ) {
687
+                    switch ($key) {
688 688
                         case 'user_id':
689
-                            $user_info[ $key ] = $user->ID;
689
+                            $user_info[$key] = $user->ID;
690 690
                             break;
691 691
                         case 'first_name':
692
-                            $user_info[ $key ] = $user->first_name;
692
+                            $user_info[$key] = $user->first_name;
693 693
                             break;
694 694
                         case 'last_name':
695
-                            $user_info[ $key ] = $user->last_name;
695
+                            $user_info[$key] = $user->last_name;
696 696
                             break;
697 697
                         case 'email':
698
-                            $user_info[ $key ] = $user->user_email;
698
+                            $user_info[$key] = $user->user_email;
699 699
                             break;
700 700
                     }
701 701
                 }
@@ -706,25 +706,25 @@  discard block
 block discarded – undo
706 706
     }
707 707
 
708 708
     private function setup_invoice_key() {
709
-        $key = $this->get_meta( '_wpinv_key', true );
709
+        $key = $this->get_meta('_wpinv_key', true);
710 710
 
711 711
         return $key;
712 712
     }
713 713
 
714 714
     private function setup_invoice_number() {
715
-        $number = $this->get_meta( '_wpinv_number', true );
715
+        $number = $this->get_meta('_wpinv_number', true);
716 716
 
717
-        if ( ! $number ) {
717
+        if (!$number) {
718 718
             $number = $this->ID;
719 719
 
720
-            if ( $this->status == 'auto-draft' ) {
721
-                if ( wpinv_sequential_number_active( $this->post_type ) ) {
722
-                    $next_number = wpinv_get_next_invoice_number( $this->post_type );
720
+            if ($this->status == 'auto-draft') {
721
+                if (wpinv_sequential_number_active($this->post_type)) {
722
+                    $next_number = wpinv_get_next_invoice_number($this->post_type);
723 723
                     $number      = $next_number;
724 724
                 }
725 725
             }
726 726
 
727
-            $number = wpinv_format_invoice_number( $number, $this->post_type );
727
+            $number = wpinv_format_invoice_number($number, $this->post_type);
728 728
         }
729 729
 
730 730
         return $number;
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 
733 733
     public function save() {}
734 734
 
735
-    public function add_fee( $args ) {
735
+    public function add_fee($args) {
736 736
         $default_args = array(
737 737
             'label'   => '',
738 738
             'amount'  => 0,
@@ -742,36 +742,36 @@  discard block
 block discarded – undo
742 742
             'item_id' => 0,
743 743
         );
744 744
 
745
-        $fee = wp_parse_args( $args, $default_args );
745
+        $fee = wp_parse_args($args, $default_args);
746 746
 
747
-        if ( empty( $fee['label'] ) ) {
747
+        if (empty($fee['label'])) {
748 748
             return false;
749 749
         }
750 750
 
751
-        $fee['id']  = sanitize_title( $fee['label'] );
751
+        $fee['id'] = sanitize_title($fee['label']);
752 752
 
753
-        $this->fees[]               = $fee;
753
+        $this->fees[] = $fee;
754 754
 
755 755
         $added_fee               = $fee;
756 756
         $added_fee['action']     = 'add';
757 757
         $this->pending['fees'][] = $added_fee;
758
-        reset( $this->fees );
758
+        reset($this->fees);
759 759
 
760
-        $this->increase_fees( $fee['amount'] );
760
+        $this->increase_fees($fee['amount']);
761 761
         return true;
762 762
     }
763 763
 
764
-    public function remove_fee( $key ) {
764
+    public function remove_fee($key) {
765 765
         $removed = false;
766 766
 
767
-        if ( is_numeric( $key ) ) {
768
-            $removed = $this->remove_fee_by( 'index', $key );
767
+        if (is_numeric($key)) {
768
+            $removed = $this->remove_fee_by('index', $key);
769 769
         }
770 770
 
771 771
         return $removed;
772 772
     }
773 773
 
774
-    public function remove_fee_by( $key, $value, $global = false ) {
774
+    public function remove_fee_by($key, $value, $global = false) {
775 775
         $allowed_fee_keys = apply_filters(
776 776
             'wpinv_fee_keys',
777 777
             array(
@@ -782,41 +782,41 @@  discard block
 block discarded – undo
782 782
             )
783 783
         );
784 784
 
785
-        if ( ! in_array( $key, $allowed_fee_keys ) ) {
785
+        if (!in_array($key, $allowed_fee_keys)) {
786 786
             return false;
787 787
         }
788 788
 
789 789
         $removed = false;
790
-        if ( 'index' === $key && array_key_exists( $value, $this->fees ) ) {
791
-            $removed_fee             = $this->fees[ $value ];
790
+        if ('index' === $key && array_key_exists($value, $this->fees)) {
791
+            $removed_fee             = $this->fees[$value];
792 792
             $removed_fee['action']   = 'remove';
793 793
             $this->pending['fees'][] = $removed_fee;
794 794
 
795
-            $this->decrease_fees( $removed_fee['amount'] );
795
+            $this->decrease_fees($removed_fee['amount']);
796 796
 
797
-            unset( $this->fees[ $value ] );
797
+            unset($this->fees[$value]);
798 798
             $removed = true;
799
-        } elseif ( 'index' !== $key ) {
800
-            foreach ( $this->fees as $index => $fee ) {
801
-                if ( isset( $fee[ $key ] ) && $fee[ $key ] == $value ) {
799
+        } elseif ('index' !== $key) {
800
+            foreach ($this->fees as $index => $fee) {
801
+                if (isset($fee[$key]) && $fee[$key] == $value) {
802 802
                     $removed_fee             = $fee;
803 803
                     $removed_fee['action']   = 'remove';
804 804
                     $this->pending['fees'][] = $removed_fee;
805 805
 
806
-                    $this->decrease_fees( $removed_fee['amount'] );
806
+                    $this->decrease_fees($removed_fee['amount']);
807 807
 
808
-                    unset( $this->fees[ $index ] );
808
+                    unset($this->fees[$index]);
809 809
                     $removed = true;
810 810
 
811
-                    if ( false === $global ) {
811
+                    if (false === $global) {
812 812
                         break;
813 813
                     }
814 814
                 }
815 815
             }
816 816
         }
817 817
 
818
-        if ( true === $removed ) {
819
-            $this->fees = array_values( $this->fees );
818
+        if (true === $removed) {
819
+            $this->fees = array_values($this->fees);
820 820
         }
821 821
 
822 822
         return $removed;
@@ -824,28 +824,28 @@  discard block
 block discarded – undo
824 824
 
825 825
 
826 826
 
827
-    public function add_note( $note = '', $customer_type = false, $added_by_user = false, $system = false ) {
827
+    public function add_note($note = '', $customer_type = false, $added_by_user = false, $system = false) {
828 828
         // Bail if no note specified
829
-        if ( ! $note ) {
829
+        if (!$note) {
830 830
             return false;
831 831
         }
832 832
 
833
-        if ( empty( $this->ID ) ) {
833
+        if (empty($this->ID)) {
834 834
             return false;
835 835
         }
836 836
 
837
-        if ( ( ( is_user_logged_in() && wpinv_current_user_can_manage_invoicing() ) || $added_by_user ) && ! $system ) {
838
-            $user                 = get_user_by( 'id', get_current_user_id() );
837
+        if (((is_user_logged_in() && wpinv_current_user_can_manage_invoicing()) || $added_by_user) && !$system) {
838
+            $user                 = get_user_by('id', get_current_user_id());
839 839
             $comment_author       = $user->display_name;
840 840
             $comment_author_email = $user->user_email;
841 841
         } else {
842 842
             $comment_author       = 'System';
843 843
             $comment_author_email = 'system@';
844
-            $comment_author_email .= isset( $_SERVER['HTTP_HOST'] ) ? str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ) : 'noreply.com';
845
-            $comment_author_email = sanitize_email( $comment_author_email );
844
+            $comment_author_email .= isset($_SERVER['HTTP_HOST']) ? str_replace('www.', '', $_SERVER['HTTP_HOST']) : 'noreply.com';
845
+            $comment_author_email = sanitize_email($comment_author_email);
846 846
         }
847 847
 
848
-        do_action( 'wpinv_pre_insert_invoice_note', $this->ID, $note, $customer_type );
848
+        do_action('wpinv_pre_insert_invoice_note', $this->ID, $note, $customer_type);
849 849
 
850 850
         $note_id = wp_insert_comment(
851 851
             wp_filter_comment(
@@ -854,8 +854,8 @@  discard block
 block discarded – undo
854 854
 					'comment_content'      => $note,
855 855
 					'comment_agent'        => 'WPInvoicing',
856 856
 					'user_id'              => is_admin() ? get_current_user_id() : 0,
857
-					'comment_date'         => current_time( 'mysql' ),
858
-					'comment_date_gmt'     => current_time( 'mysql', 1 ),
857
+					'comment_date'         => current_time('mysql'),
858
+					'comment_date_gmt'     => current_time('mysql', 1),
859 859
 					'comment_approved'     => 1,
860 860
 					'comment_parent'       => 0,
861 861
 					'comment_author'       => $comment_author,
@@ -867,10 +867,10 @@  discard block
 block discarded – undo
867 867
             )
868 868
         );
869 869
 
870
-        do_action( 'wpinv_insert_payment_note', $note_id, $this->ID, $note );
870
+        do_action('wpinv_insert_payment_note', $note_id, $this->ID, $note);
871 871
 
872
-        if ( $customer_type ) {
873
-            add_comment_meta( $note_id, '_wpi_customer_note', 1 );
872
+        if ($customer_type) {
873
+            add_comment_meta($note_id, '_wpi_customer_note', 1);
874 874
 
875 875
             do_action(
876 876
                 'wpinv_new_customer_note',
@@ -884,40 +884,40 @@  discard block
 block discarded – undo
884 884
         return $note_id;
885 885
     }
886 886
 
887
-    private function increase_subtotal( $amount = 0.00 ) {
887
+    private function increase_subtotal($amount = 0.00) {
888 888
         $amount          = (float) $amount;
889 889
         $this->subtotal += $amount;
890
-        $this->subtotal  = wpinv_round_amount( $this->subtotal );
890
+        $this->subtotal  = wpinv_round_amount($this->subtotal);
891 891
 
892 892
         $this->recalculate_total();
893 893
     }
894 894
 
895
-    private function decrease_subtotal( $amount = 0.00 ) {
895
+    private function decrease_subtotal($amount = 0.00) {
896 896
         $amount          = (float) $amount;
897 897
         $this->subtotal -= $amount;
898
-        $this->subtotal  = wpinv_round_amount( $this->subtotal );
898
+        $this->subtotal  = wpinv_round_amount($this->subtotal);
899 899
 
900
-        if ( $this->subtotal < 0 ) {
900
+        if ($this->subtotal < 0) {
901 901
             $this->subtotal = 0;
902 902
         }
903 903
 
904 904
         $this->recalculate_total();
905 905
     }
906 906
 
907
-    private function increase_fees( $amount = 0.00 ) {
908
-        $amount            = (float)$amount;
907
+    private function increase_fees($amount = 0.00) {
908
+        $amount            = (float) $amount;
909 909
         $this->fees_total += $amount;
910
-        $this->fees_total  = wpinv_round_amount( $this->fees_total );
910
+        $this->fees_total  = wpinv_round_amount($this->fees_total);
911 911
 
912 912
         $this->recalculate_total();
913 913
     }
914 914
 
915
-    private function decrease_fees( $amount = 0.00 ) {
915
+    private function decrease_fees($amount = 0.00) {
916 916
         $amount            = (float) $amount;
917 917
         $this->fees_total -= $amount;
918
-        $this->fees_total  = wpinv_round_amount( $this->fees_total );
918
+        $this->fees_total  = wpinv_round_amount($this->fees_total);
919 919
 
920
-        if ( $this->fees_total < 0 ) {
920
+        if ($this->fees_total < 0) {
921 921
             $this->fees_total = 0;
922 922
         }
923 923
 
@@ -928,56 +928,56 @@  discard block
 block discarded – undo
928 928
         global $wpi_nosave;
929 929
 
930 930
         $this->total = $this->subtotal + $this->tax + $this->fees_total;
931
-        $this->total = wpinv_round_amount( $this->total );
931
+        $this->total = wpinv_round_amount($this->total);
932 932
 
933
-        do_action( 'wpinv_invoice_recalculate_total', $this, $wpi_nosave );
933
+        do_action('wpinv_invoice_recalculate_total', $this, $wpi_nosave);
934 934
     }
935 935
 
936
-    public function increase_tax( $amount = 0.00 ) {
936
+    public function increase_tax($amount = 0.00) {
937 937
         $amount       = (float) $amount;
938 938
         $this->tax   += $amount;
939 939
 
940 940
         $this->recalculate_total();
941 941
     }
942 942
 
943
-    public function decrease_tax( $amount = 0.00 ) {
943
+    public function decrease_tax($amount = 0.00) {
944 944
         $amount     = (float) $amount;
945 945
         $this->tax -= $amount;
946 946
 
947
-        if ( $this->tax < 0 ) {
947
+        if ($this->tax < 0) {
948 948
             $this->tax = 0;
949 949
         }
950 950
 
951 951
         $this->recalculate_total();
952 952
     }
953 953
 
954
-    public function update_status( $new_status = false, $note = '', $manual = false ) {
955
-        $old_status = ! empty( $this->old_status ) ? $this->old_status : get_post_status( $this->ID );
954
+    public function update_status($new_status = false, $note = '', $manual = false) {
955
+        $old_status = !empty($this->old_status) ? $this->old_status : get_post_status($this->ID);
956 956
 
957
-        if ( $old_status === $new_status && in_array( $new_status, array_keys( wpinv_get_invoice_statuses( true ) ) ) ) {
957
+        if ($old_status === $new_status && in_array($new_status, array_keys(wpinv_get_invoice_statuses(true)))) {
958 958
             return false; // Don't permit status changes that aren't changes
959 959
         }
960 960
 
961
-        $do_change = apply_filters( 'wpinv_should_update_invoice_status', true, $this->ID, $new_status, $old_status );
961
+        $do_change = apply_filters('wpinv_should_update_invoice_status', true, $this->ID, $new_status, $old_status);
962 962
         $updated = false;
963 963
 
964
-        if ( $do_change ) {
965
-            do_action( 'wpinv_before_invoice_status_change', $this->ID, $new_status, $old_status );
964
+        if ($do_change) {
965
+            do_action('wpinv_before_invoice_status_change', $this->ID, $new_status, $old_status);
966 966
 
967 967
             $update_post_data                   = array();
968 968
             $update_post_data['ID']             = $this->ID;
969 969
             $update_post_data['post_status']    = $new_status;
970
-            $update_post_data['edit_date']      = current_time( 'mysql', 0 );
971
-            $update_post_data['edit_date_gmt']  = current_time( 'mysql', 1 );
970
+            $update_post_data['edit_date']      = current_time('mysql', 0);
971
+            $update_post_data['edit_date_gmt']  = current_time('mysql', 1);
972 972
 
973
-            $update_post_data = apply_filters( 'wpinv_update_invoice_status_fields', $update_post_data, $this->ID );
973
+            $update_post_data = apply_filters('wpinv_update_invoice_status_fields', $update_post_data, $this->ID);
974 974
 
975
-            $updated = wp_update_post( $update_post_data );
975
+            $updated = wp_update_post($update_post_data);
976 976
 
977 977
             // Status was changed.
978
-            do_action( 'wpinv_status_' . $new_status, $this->ID, $old_status );
979
-            do_action( 'wpinv_status_' . $old_status . '_to_' . $new_status, $this->ID, $old_status );
980
-            do_action( 'wpinv_update_status', $this->ID, $new_status, $old_status );
978
+            do_action('wpinv_status_' . $new_status, $this->ID, $old_status);
979
+            do_action('wpinv_status_' . $old_status . '_to_' . $new_status, $this->ID, $old_status);
980
+            do_action('wpinv_update_status', $this->ID, $new_status, $old_status);
981 981
         }
982 982
 
983 983
         return $updated;
@@ -994,114 +994,114 @@  discard block
 block discarded – undo
994 994
     public function update_meta() {}
995 995
 
996 996
     // get data
997
-    public function get_meta( $meta_key = '_wpinv_payment_meta', $single = true ) {
998
-        $meta = get_post_meta( $this->ID, $meta_key, $single );
997
+    public function get_meta($meta_key = '_wpinv_payment_meta', $single = true) {
998
+        $meta = get_post_meta($this->ID, $meta_key, $single);
999 999
 
1000
-        if ( $meta_key === '_wpinv_payment_meta' ) {
1000
+        if ($meta_key === '_wpinv_payment_meta') {
1001 1001
 
1002
-            if ( ! is_array( $meta ) ) {
1003
-$meta = array();} // we need this to be an array so make sure it is.
1002
+            if (!is_array($meta)) {
1003
+$meta = array(); } // we need this to be an array so make sure it is.
1004 1004
 
1005
-            if ( empty( $meta['key'] ) ) {
1005
+            if (empty($meta['key'])) {
1006 1006
                 $meta['key'] = $this->setup_invoice_key();
1007 1007
             }
1008 1008
 
1009
-            if ( empty( $meta['date'] ) ) {
1010
-                $meta['date'] = get_post_field( 'post_date', $this->ID );
1009
+            if (empty($meta['date'])) {
1010
+                $meta['date'] = get_post_field('post_date', $this->ID);
1011 1011
             }
1012 1012
         }
1013 1013
 
1014
-        $meta = apply_filters( 'wpinv_get_invoice_meta_' . $meta_key, $meta, $this->ID );
1014
+        $meta = apply_filters('wpinv_get_invoice_meta_' . $meta_key, $meta, $this->ID);
1015 1015
 
1016
-        return apply_filters( 'wpinv_get_invoice_meta', $meta, $this->ID, $meta_key );
1016
+        return apply_filters('wpinv_get_invoice_meta', $meta, $this->ID, $meta_key);
1017 1017
     }
1018 1018
 
1019 1019
     public function get_description() {
1020
-        $post = get_post( $this->ID );
1020
+        $post = get_post($this->ID);
1021 1021
 
1022
-        $description = ! empty( $post ) ? $post->post_content : '';
1023
-        return apply_filters( 'wpinv_get_description', $description, $this->ID, $this );
1022
+        $description = !empty($post) ? $post->post_content : '';
1023
+        return apply_filters('wpinv_get_description', $description, $this->ID, $this);
1024 1024
     }
1025 1025
 
1026
-    public function get_status( $nicename = false ) {
1027
-        if ( ! $nicename ) {
1026
+    public function get_status($nicename = false) {
1027
+        if (!$nicename) {
1028 1028
             $status = $this->status;
1029 1029
         } else {
1030 1030
             $status = $this->status_nicename;
1031 1031
         }
1032 1032
 
1033
-        return apply_filters( 'wpinv_get_status', $status, $nicename, $this->ID, $this );
1033
+        return apply_filters('wpinv_get_status', $status, $nicename, $this->ID, $this);
1034 1034
     }
1035 1035
 
1036 1036
     public function get_cart_details() {
1037
-        return apply_filters( 'wpinv_cart_details', $this->cart_details, $this->ID, $this );
1037
+        return apply_filters('wpinv_cart_details', $this->cart_details, $this->ID, $this);
1038 1038
     }
1039 1039
 
1040
-    public function get_subtotal( $currency = false ) {
1041
-        $subtotal = wpinv_round_amount( $this->subtotal );
1040
+    public function get_subtotal($currency = false) {
1041
+        $subtotal = wpinv_round_amount($this->subtotal);
1042 1042
 
1043
-        if ( $currency ) {
1044
-            $subtotal = wpinv_price( wpinv_format_amount( $subtotal, null, ! $currency ), $this->get_currency() );
1043
+        if ($currency) {
1044
+            $subtotal = wpinv_price(wpinv_format_amount($subtotal, null, !$currency), $this->get_currency());
1045 1045
         }
1046 1046
 
1047
-        return apply_filters( 'wpinv_get_invoice_subtotal', $subtotal, $this->ID, $this, $currency );
1047
+        return apply_filters('wpinv_get_invoice_subtotal', $subtotal, $this->ID, $this, $currency);
1048 1048
     }
1049 1049
 
1050
-    public function get_total( $currency = false ) {
1051
-        if ( $this->is_free_trial() ) {
1052
-            $total = wpinv_round_amount( 0 );
1050
+    public function get_total($currency = false) {
1051
+        if ($this->is_free_trial()) {
1052
+            $total = wpinv_round_amount(0);
1053 1053
         } else {
1054
-            $total = wpinv_round_amount( $this->total );
1054
+            $total = wpinv_round_amount($this->total);
1055 1055
         }
1056
-        if ( $currency ) {
1057
-            $total = wpinv_price( wpinv_format_amount( $total, null, ! $currency ), $this->get_currency() );
1056
+        if ($currency) {
1057
+            $total = wpinv_price(wpinv_format_amount($total, null, !$currency), $this->get_currency());
1058 1058
         }
1059 1059
 
1060
-        return apply_filters( 'wpinv_get_invoice_total', $total, $this->ID, $this, $currency );
1060
+        return apply_filters('wpinv_get_invoice_total', $total, $this->ID, $this, $currency);
1061 1061
     }
1062 1062
 
1063 1063
     public function get_recurring_details() {}
1064 1064
 
1065
-    public function get_final_tax( $currency = false ) {
1066
-        $final_total = wpinv_round_amount( $this->tax );
1067
-        if ( $currency ) {
1068
-            $final_total = wpinv_price( wpinv_format_amount( $final_total, null, ! $currency ), $this->get_currency() );
1065
+    public function get_final_tax($currency = false) {
1066
+        $final_total = wpinv_round_amount($this->tax);
1067
+        if ($currency) {
1068
+            $final_total = wpinv_price(wpinv_format_amount($final_total, null, !$currency), $this->get_currency());
1069 1069
         }
1070 1070
 
1071
-        return apply_filters( 'wpinv_get_invoice_final_total', $final_total, $this, $currency );
1071
+        return apply_filters('wpinv_get_invoice_final_total', $final_total, $this, $currency);
1072 1072
     }
1073 1073
 
1074
-    public function get_discounts( $array = false ) {
1074
+    public function get_discounts($array = false) {
1075 1075
         $discounts = $this->discounts;
1076
-        if ( $array && $discounts ) {
1077
-            $discounts = explode( ',', $discounts );
1076
+        if ($array && $discounts) {
1077
+            $discounts = explode(',', $discounts);
1078 1078
         }
1079
-        return apply_filters( 'wpinv_payment_discounts', $discounts, $this->ID, $this, $array );
1079
+        return apply_filters('wpinv_payment_discounts', $discounts, $this->ID, $this, $array);
1080 1080
     }
1081 1081
 
1082
-    public function get_discount( $currency = false, $dash = false ) {
1083
-        if ( ! empty( $this->discounts ) ) {
1082
+    public function get_discount($currency = false, $dash = false) {
1083
+        if (!empty($this->discounts)) {
1084 1084
             global $ajax_cart_details;
1085 1085
             $ajax_cart_details = $this->get_cart_details();
1086 1086
 
1087
-            if ( ! empty( $ajax_cart_details ) && count( $ajax_cart_details ) == count( $this->items ) ) {
1087
+            if (!empty($ajax_cart_details) && count($ajax_cart_details) == count($this->items)) {
1088 1088
                 $cart_items = $ajax_cart_details;
1089 1089
             } else {
1090 1090
                 $cart_items = $this->items;
1091 1091
             }
1092 1092
 
1093
-            $this->discount = wpinv_get_cart_items_discount_amount( $cart_items, $this->discounts );
1093
+            $this->discount = wpinv_get_cart_items_discount_amount($cart_items, $this->discounts);
1094 1094
         }
1095
-        $discount   = wpinv_round_amount( $this->discount );
1095
+        $discount   = wpinv_round_amount($this->discount);
1096 1096
         $dash       = $dash && $discount > 0 ? '&ndash;' : '';
1097 1097
 
1098
-        if ( $currency ) {
1099
-            $discount = wpinv_price( wpinv_format_amount( $discount, null, ! $currency ), $this->get_currency() );
1098
+        if ($currency) {
1099
+            $discount = wpinv_price(wpinv_format_amount($discount, null, !$currency), $this->get_currency());
1100 1100
         }
1101 1101
 
1102
-        $discount   = $dash . $discount;
1102
+        $discount = $dash . $discount;
1103 1103
 
1104
-        return apply_filters( 'wpinv_get_invoice_discount', $discount, $this->ID, $this, $currency, $dash );
1104
+        return apply_filters('wpinv_get_invoice_discount', $discount, $this->ID, $this, $currency, $dash);
1105 1105
     }
1106 1106
 
1107 1107
     public function get_discount_code() {
@@ -1113,150 +1113,150 @@  discard block
 block discarded – undo
1113 1113
         return (int) $this->disable_taxes === 0;
1114 1114
     }
1115 1115
 
1116
-    public function get_tax( $currency = false ) {
1117
-        $tax = wpinv_round_amount( $this->tax );
1116
+    public function get_tax($currency = false) {
1117
+        $tax = wpinv_round_amount($this->tax);
1118 1118
 
1119
-        if ( $currency ) {
1120
-            $tax = wpinv_price( wpinv_format_amount( $tax, null, ! $currency ), $this->get_currency() );
1119
+        if ($currency) {
1120
+            $tax = wpinv_price(wpinv_format_amount($tax, null, !$currency), $this->get_currency());
1121 1121
         }
1122 1122
 
1123
-        if ( ! $this->is_taxable() ) {
1124
-            $tax = wpinv_round_amount( 0.00 );
1123
+        if (!$this->is_taxable()) {
1124
+            $tax = wpinv_round_amount(0.00);
1125 1125
         }
1126 1126
 
1127
-        return apply_filters( 'wpinv_get_invoice_tax', $tax, $this->ID, $this, $currency );
1127
+        return apply_filters('wpinv_get_invoice_tax', $tax, $this->ID, $this, $currency);
1128 1128
     }
1129 1129
 
1130
-    public function get_fees( $type = 'all' ) {
1131
-        $fees    = array();
1130
+    public function get_fees($type = 'all') {
1131
+        $fees = array();
1132 1132
 
1133
-        if ( ! empty( $this->fees ) && is_array( $this->fees ) ) {
1134
-            foreach ( $this->fees as $fee ) {
1135
-                if ( 'all' != $type && ! empty( $fee['type'] ) && $type != $fee['type'] ) {
1133
+        if (!empty($this->fees) && is_array($this->fees)) {
1134
+            foreach ($this->fees as $fee) {
1135
+                if ('all' != $type && !empty($fee['type']) && $type != $fee['type']) {
1136 1136
                     continue;
1137 1137
                 }
1138 1138
 
1139
-                $fee['label'] = stripslashes( $fee['label'] );
1140
-                $fee['amount_display'] = wpinv_price( $fee['amount'], $this->get_currency() );
1141
-                $fees[]    = $fee;
1139
+                $fee['label'] = stripslashes($fee['label']);
1140
+                $fee['amount_display'] = wpinv_price($fee['amount'], $this->get_currency());
1141
+                $fees[] = $fee;
1142 1142
             }
1143 1143
         }
1144 1144
 
1145
-        return apply_filters( 'wpinv_get_invoice_fees', $fees, $this->ID, $this );
1145
+        return apply_filters('wpinv_get_invoice_fees', $fees, $this->ID, $this);
1146 1146
     }
1147 1147
 
1148 1148
     public function get_fees_total() {
1149 1149
         $fees_total = (float) 0.00;
1150 1150
 
1151
-        $payment_fees = isset( $this->payment_meta['fees'] ) ? $this->payment_meta['fees'] : array();
1152
-        if ( ! empty( $payment_fees ) ) {
1153
-            foreach ( $payment_fees as $fee ) {
1151
+        $payment_fees = isset($this->payment_meta['fees']) ? $this->payment_meta['fees'] : array();
1152
+        if (!empty($payment_fees)) {
1153
+            foreach ($payment_fees as $fee) {
1154 1154
                 $fees_total += (float) $fee['amount'];
1155 1155
             }
1156 1156
         }
1157 1157
 
1158
-        return apply_filters( 'wpinv_get_invoice_fees_total', $fees_total, $this->ID, $this );
1158
+        return apply_filters('wpinv_get_invoice_fees_total', $fees_total, $this->ID, $this);
1159 1159
 
1160 1160
     }
1161 1161
 
1162 1162
     public function get_user_id() {
1163
-        return apply_filters( 'wpinv_user_id', $this->user_id, $this->ID, $this );
1163
+        return apply_filters('wpinv_user_id', $this->user_id, $this->ID, $this);
1164 1164
     }
1165 1165
 
1166 1166
     public function get_first_name() {
1167
-        return apply_filters( 'wpinv_first_name', $this->first_name, $this->ID, $this );
1167
+        return apply_filters('wpinv_first_name', $this->first_name, $this->ID, $this);
1168 1168
     }
1169 1169
 
1170 1170
     public function get_last_name() {
1171
-        return apply_filters( 'wpinv_last_name', $this->last_name, $this->ID, $this );
1171
+        return apply_filters('wpinv_last_name', $this->last_name, $this->ID, $this);
1172 1172
     }
1173 1173
 
1174 1174
     public function get_user_full_name() {
1175
-        return apply_filters( 'wpinv_user_full_name', $this->full_name, $this->ID, $this );
1175
+        return apply_filters('wpinv_user_full_name', $this->full_name, $this->ID, $this);
1176 1176
     }
1177 1177
 
1178 1178
     public function get_user_info() {
1179
-        return apply_filters( 'wpinv_user_info', $this->user_info, $this->ID, $this );
1179
+        return apply_filters('wpinv_user_info', $this->user_info, $this->ID, $this);
1180 1180
     }
1181 1181
 
1182 1182
     public function get_email() {
1183
-        return apply_filters( 'wpinv_user_email', $this->email, $this->ID, $this );
1183
+        return apply_filters('wpinv_user_email', $this->email, $this->ID, $this);
1184 1184
     }
1185 1185
 
1186 1186
     public function get_address() {
1187
-        return apply_filters( 'wpinv_address', $this->address, $this->ID, $this );
1187
+        return apply_filters('wpinv_address', $this->address, $this->ID, $this);
1188 1188
     }
1189 1189
 
1190 1190
     public function get_phone() {
1191
-        return apply_filters( 'wpinv_phone', $this->phone, $this->ID, $this );
1191
+        return apply_filters('wpinv_phone', $this->phone, $this->ID, $this);
1192 1192
     }
1193 1193
 
1194 1194
     public function get_number() {
1195
-        return apply_filters( 'wpinv_number', $this->number, $this->ID, $this );
1195
+        return apply_filters('wpinv_number', $this->number, $this->ID, $this);
1196 1196
     }
1197 1197
 
1198 1198
     public function get_items() {
1199
-        return apply_filters( 'wpinv_payment_meta_items', $this->items, $this->ID, $this );
1199
+        return apply_filters('wpinv_payment_meta_items', $this->items, $this->ID, $this);
1200 1200
     }
1201 1201
 
1202 1202
     public function get_key() {
1203
-        return apply_filters( 'wpinv_key', $this->key, $this->ID, $this );
1203
+        return apply_filters('wpinv_key', $this->key, $this->ID, $this);
1204 1204
     }
1205 1205
 
1206 1206
     public function get_transaction_id() {
1207
-        return apply_filters( 'wpinv_get_invoice_transaction_id', $this->transaction_id, $this->ID, $this );
1207
+        return apply_filters('wpinv_get_invoice_transaction_id', $this->transaction_id, $this->ID, $this);
1208 1208
     }
1209 1209
 
1210 1210
     public function get_gateway() {
1211
-        return apply_filters( 'wpinv_gateway', $this->gateway, $this->ID, $this );
1211
+        return apply_filters('wpinv_gateway', $this->gateway, $this->ID, $this);
1212 1212
     }
1213 1213
 
1214 1214
     public function get_gateway_title() {}
1215 1215
 
1216 1216
     public function get_currency() {
1217
-        return apply_filters( 'wpinv_currency_code', $this->currency, $this->ID, $this );
1217
+        return apply_filters('wpinv_currency_code', $this->currency, $this->ID, $this);
1218 1218
     }
1219 1219
 
1220 1220
     public function get_created_date() {
1221
-        return apply_filters( 'wpinv_created_date', $this->date, $this->ID, $this );
1221
+        return apply_filters('wpinv_created_date', $this->date, $this->ID, $this);
1222 1222
     }
1223 1223
 
1224
-    public function get_due_date( $display = false ) {
1225
-        $due_date = apply_filters( 'wpinv_due_date', $this->due_date, $this->ID, $this );
1224
+    public function get_due_date($display = false) {
1225
+        $due_date = apply_filters('wpinv_due_date', $this->due_date, $this->ID, $this);
1226 1226
 
1227
-        if ( ! $display ) {
1227
+        if (!$display) {
1228 1228
             return $due_date;
1229 1229
         }
1230 1230
 
1231
-        return getpaid_format_date( $this->due_date );
1231
+        return getpaid_format_date($this->due_date);
1232 1232
     }
1233 1233
 
1234 1234
     public function get_completed_date() {
1235
-        return apply_filters( 'wpinv_completed_date', $this->completed_date, $this->ID, $this );
1235
+        return apply_filters('wpinv_completed_date', $this->completed_date, $this->ID, $this);
1236 1236
     }
1237 1237
 
1238
-    public function get_invoice_date( $formatted = true ) {
1238
+    public function get_invoice_date($formatted = true) {
1239 1239
         $date_completed = $this->completed_date;
1240 1240
         $invoice_date   = $date_completed != '' && $date_completed != '0000-00-00 00:00:00' ? $date_completed : '';
1241 1241
 
1242
-        if ( $invoice_date == '' ) {
1242
+        if ($invoice_date == '') {
1243 1243
             $date_created   = $this->date;
1244 1244
             $invoice_date   = $date_created != '' && $date_created != '0000-00-00 00:00:00' ? $date_created : '';
1245 1245
         }
1246 1246
 
1247
-        if ( $formatted && $invoice_date ) {
1248
-            $invoice_date   = getpaid_format_date( $invoice_date );
1247
+        if ($formatted && $invoice_date) {
1248
+            $invoice_date = getpaid_format_date($invoice_date);
1249 1249
         }
1250 1250
 
1251
-        return apply_filters( 'wpinv_get_invoice_date', $invoice_date, $formatted, $this->ID, $this );
1251
+        return apply_filters('wpinv_get_invoice_date', $invoice_date, $formatted, $this->ID, $this);
1252 1252
     }
1253 1253
 
1254 1254
     public function get_ip() {
1255
-        return apply_filters( 'wpinv_user_ip', $this->ip, $this->ID, $this );
1255
+        return apply_filters('wpinv_user_ip', $this->ip, $this->ID, $this);
1256 1256
     }
1257 1257
 
1258
-    public function has_status( $status ) {
1259
-        return apply_filters( 'wpinv_has_status', ( is_array( $status ) && in_array( $this->get_status(), $status ) ) || $this->get_status() === $status ? true : false, $this, $status );
1258
+    public function has_status($status) {
1259
+        return apply_filters('wpinv_has_status', (is_array($status) && in_array($this->get_status(), $status)) || $this->get_status() === $status ? true : false, $this, $status);
1260 1260
     }
1261 1261
 
1262 1262
     public function add_item() {}
@@ -1273,66 +1273,66 @@  discard block
 block discarded – undo
1273 1273
 
1274 1274
     public function get_view_url() {}
1275 1275
 
1276
-    public function generate_key( $string = '' ) {
1277
-        $auth_key  = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
1278
-        return strtolower( md5( $string . date( 'Y-m-d H:i:s' ) . $auth_key . uniqid( 'wpinv', true ) ) );  // Unique key
1276
+    public function generate_key($string = '') {
1277
+        $auth_key = defined('AUTH_KEY') ? AUTH_KEY : '';
1278
+        return strtolower(md5($string . date('Y-m-d H:i:s') . $auth_key . uniqid('wpinv', true))); // Unique key
1279 1279
     }
1280 1280
 
1281 1281
     public function is_recurring() {
1282
-        if ( empty( $this->cart_details ) ) {
1282
+        if (empty($this->cart_details)) {
1283 1283
             return false;
1284 1284
         }
1285 1285
 
1286 1286
         $has_subscription = false;
1287
-        foreach ( $this->cart_details as $cart_item ) {
1288
-            if ( ! empty( $cart_item['id'] ) && wpinv_is_recurring_item( $cart_item['id'] ) ) {
1287
+        foreach ($this->cart_details as $cart_item) {
1288
+            if (!empty($cart_item['id']) && wpinv_is_recurring_item($cart_item['id'])) {
1289 1289
                 $has_subscription = true;
1290 1290
                 break;
1291 1291
             }
1292 1292
         }
1293 1293
 
1294
-        if ( count( $this->cart_details ) > 1 ) {
1294
+        if (count($this->cart_details) > 1) {
1295 1295
             $has_subscription = false;
1296 1296
         }
1297 1297
 
1298
-        return apply_filters( 'wpinv_invoice_has_recurring_item', $has_subscription, $this->cart_details );
1298
+        return apply_filters('wpinv_invoice_has_recurring_item', $has_subscription, $this->cart_details);
1299 1299
     }
1300 1300
 
1301 1301
     public function is_free_trial() {
1302 1302
         $is_free_trial = false;
1303 1303
 
1304
-        if ( $this->is_parent() && $item = $this->get_recurring( true ) ) {
1305
-            if ( ! empty( $item ) && $item->has_free_trial() ) {
1304
+        if ($this->is_parent() && $item = $this->get_recurring(true)) {
1305
+            if (!empty($item) && $item->has_free_trial()) {
1306 1306
                 $is_free_trial = true;
1307 1307
             }
1308 1308
         }
1309 1309
 
1310
-        return apply_filters( 'wpinv_invoice_is_free_trial', $is_free_trial, $this->cart_details, $this );
1310
+        return apply_filters('wpinv_invoice_is_free_trial', $is_free_trial, $this->cart_details, $this);
1311 1311
     }
1312 1312
 
1313 1313
     public function is_initial_free() {}
1314 1314
 
1315
-    public function get_recurring( $object = false ) {
1315
+    public function get_recurring($object = false) {
1316 1316
         $item = null;
1317 1317
 
1318
-        if ( empty( $this->cart_details ) ) {
1318
+        if (empty($this->cart_details)) {
1319 1319
             return $item;
1320 1320
         }
1321 1321
 
1322
-        foreach ( $this->cart_details as $cart_item ) {
1323
-            if ( ! empty( $cart_item['id'] ) && wpinv_is_recurring_item( $cart_item['id'] ) ) {
1322
+        foreach ($this->cart_details as $cart_item) {
1323
+            if (!empty($cart_item['id']) && wpinv_is_recurring_item($cart_item['id'])) {
1324 1324
                 $item = $cart_item['id'];
1325 1325
                 break;
1326 1326
             }
1327 1327
         }
1328 1328
 
1329
-        if ( $object ) {
1330
-            $item = $item ? new WPInv_Item( $item ) : null;
1329
+        if ($object) {
1330
+            $item = $item ? new WPInv_Item($item) : null;
1331 1331
 
1332
-            apply_filters( 'wpinv_invoice_get_recurring_item', $item, $this );
1332
+            apply_filters('wpinv_invoice_get_recurring_item', $item, $this);
1333 1333
         }
1334 1334
 
1335
-        return apply_filters( 'wpinv_invoice_get_recurring_item_id', $item, $this );
1335
+        return apply_filters('wpinv_invoice_get_recurring_item_id', $item, $this);
1336 1336
     }
1337 1337
 
1338 1338
     public function get_subscription_name() {}
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
     public function get_subscription_id() {}
1341 1341
 
1342 1342
     public function is_parent() {
1343
-        return ! empty( $this->parent_invoice );
1343
+        return !empty($this->parent_invoice);
1344 1344
     }
1345 1345
 
1346 1346
     public function is_renewal() {}
@@ -1354,8 +1354,8 @@  discard block
 block discarded – undo
1354 1354
     public function is_refunded() {}
1355 1355
 
1356 1356
     public function is_free() {
1357
-        $total = (float) wpinv_round_amount( $this->get_total() );
1358
-        return $total > 0 && ! $this->is_recurring();
1357
+        $total = (float) wpinv_round_amount($this->get_total());
1358
+        return $total > 0 && !$this->is_recurring();
1359 1359
     }
1360 1360
 
1361 1361
     public function has_vat() {}
Please login to merge, or discard this patch.
templates/payment-forms/elements/separator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 ?>
12 12
 
13 13
 <hr class="featurette-divider" />
Please login to merge, or discard this patch.
templates/wpinv-payment-processing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
     <p>
4 4
         <?php
5 5
             echo wp_sprintf(
6
-                wp_kses_post( __( 'Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing' ) ),
7
-                esc_url_raw( remove_query_arg( 'payment-confirm' ) )
6
+                wp_kses_post(__('Your payment is processing. This page will reload automatically in 10 seconds. If it does not, click <a href="%s">here</a>.', 'invoicing')),
7
+                esc_url_raw(remove_query_arg('payment-confirm'))
8 8
             );
9 9
         ?>
10 10
         <i class="fa fa-spin fa-refresh"></i>
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     <script type="text/javascript">
14 14
         setTimeout(
15 15
             function(){
16
-                window.location.href = '<?php echo esc_url_raw( remove_query_arg( 'payment-confirm' ) ); ?>';
16
+                window.location.href = '<?php echo esc_url_raw(remove_query_arg('payment-confirm')); ?>';
17 17
             },
18 18
             10000
19 19
         );
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/items.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14 14
 <div v-if='!is_default'>
15
-    <div class='alert alert-info' role='alert'><?php esc_html_e( 'Item totals will appear here. Click to set items.', 'invoicing' ); ?></div>
15
+    <div class='alert alert-info' role='alert'><?php esc_html_e('Item totals will appear here. Click to set items.', 'invoicing'); ?></div>
16 16
 </div>
17 17
 
18 18
 <div v-if='is_default'>
19
-    <div class='alert alert-info' role='alert'><?php esc_html_e( 'Item totals will appear here.', 'invoicing' ); ?></div>
19
+    <div class='alert alert-info' role='alert'><?php esc_html_e('Item totals will appear here.', 'invoicing'); ?></div>
20 20
 </div>
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/file_upload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
14 14
 <label><span v-html="form_element.label"></span></label>
15 15
 <div class="d-flex w-100 flex-column align-items-center justify-content-center p-2" style="height: 200px; border: 3px dashed rgb(136, 136, 136); cursor: pointer;">
16 16
     <div class="h5 text-dark">
17
-        <span v-if="form_element.max_file_num > 1"><?php esc_html_e( 'Drag files to this area or click to upload', 'invoicing' ); ?></span>
18
-        <span v-if="form_element.max_file_num < 2"><?php esc_html_e( 'Drag your file to this area or click to upload', 'invoicing' ); ?></span>
17
+        <span v-if="form_element.max_file_num > 1"><?php esc_html_e('Drag files to this area or click to upload', 'invoicing'); ?></span>
18
+        <span v-if="form_element.max_file_num < 2"><?php esc_html_e('Drag your file to this area or click to upload', 'invoicing'); ?></span>
19 19
     </div>
20 20
     <small v-if='form_element.description' class='form-text text-muted' v-html='form_element.description'></small>
21 21
 </div>
Please login to merge, or discard this patch.
templates/invoice/header-left-actions.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,25 +8,25 @@
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+defined('ABSPATH') || exit;
12 12
 
13 13
 ?>
14 14
 
15 15
         <div class="getpaid-header-left-actions">
16 16
 
17
-            <?php if ( $invoice->is_type( 'invoice' ) && $invoice->needs_payment() && ! $invoice->is_held() ) : ?>
18
-                <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>">
19
-                    <?php esc_html_e( 'Pay For Invoice', 'invoicing' ); ?>
17
+            <?php if ($invoice->is_type('invoice') && $invoice->needs_payment() && !$invoice->is_held()) : ?>
18
+                <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url($invoice->get_checkout_payment_url()); ?>">
19
+                    <?php esc_html_e('Pay For Invoice', 'invoicing'); ?>
20 20
                 </a>
21 21
             <?php endif; ?>
22 22
 
23
-            <?php if ( $invoice->is_type( 'invoice' ) && $invoice->is_paid() ) : ?>
24
-                <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url( $invoice->get_receipt_url() ); ?>">
25
-                    <?php esc_html_e( 'View Receipt', 'invoicing' ); ?>
23
+            <?php if ($invoice->is_type('invoice') && $invoice->is_paid()) : ?>
24
+                <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url($invoice->get_receipt_url()); ?>">
25
+                    <?php esc_html_e('View Receipt', 'invoicing'); ?>
26 26
                 </a>
27 27
             <?php endif; ?>
28 28
 
29
-            <?php do_action( 'wpinv_invoice_display_left_actions', $invoice ); ?>
29
+            <?php do_action('wpinv_invoice_display_left_actions', $invoice); ?>
30 30
 
31 31
         </div>
32 32
 
Please login to merge, or discard this patch.
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+    <?php
2 2
 /**
3 3
  * Displays actions on the left side of the invoice header.
4 4
  *
@@ -8,24 +8,24 @@  discard block
 block discarded – undo
8 8
  * @var WPInv_Invoice $invoice
9 9
  */
10 10
 
11
-defined( 'ABSPATH' ) || exit;
11
+    defined( 'ABSPATH' ) || exit;
12 12
 
13
-?>
13
+    ?>
14 14
 
15 15
         <div class="getpaid-header-left-actions">
16 16
 
17 17
             <?php if ( $invoice->is_type( 'invoice' ) && $invoice->needs_payment() && ! $invoice->is_held() ) : ?>
18
-                <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>">
18
+                    <a class="btn btn-sm btn-primary m-1 d-inline-block invoice-action-pay" href="<?php echo esc_url( $invoice->get_checkout_payment_url() ); ?>">
19 19
                     <?php esc_html_e( 'Pay For Invoice', 'invoicing' ); ?>
20
-                </a>
20
+                    </a>
21 21
             <?php endif; ?>
22
-
22
+    
23 23
             <?php if ( $invoice->is_type( 'invoice' ) && $invoice->is_paid() ) : ?>
24
-                <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url( $invoice->get_receipt_url() ); ?>">
24
+                    <a class="btn btn-sm btn-info m-1 d-inline-block invoice-action-receipt" href="<?php echo esc_url( $invoice->get_receipt_url() ); ?>">
25 25
                     <?php esc_html_e( 'View Receipt', 'invoicing' ); ?>
26
-                </a>
26
+                    </a>
27 27
             <?php endif; ?>
28
-
28
+    
29 29
             <?php do_action( 'wpinv_invoice_display_left_actions', $invoice ); ?>
30 30
 
31 31
         </div>
Please login to merge, or discard this patch.
templates/subscriptions/subscriptions-table-row.php 3 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -13,42 +13,42 @@
 block discarded – undo
13 13
 
14 14
 foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) :
15 15
 
16
-	$class = sanitize_html_class( $column );
17
-	echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>";
16
+    $class = sanitize_html_class( $column );
17
+    echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>";
18 18
 
19
-		do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
19
+        do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
20 20
 
21
-		switch ( $column ) :
21
+        switch ( $column ) :
22 22
 
23
-		case 'subscription':
24
-			$subscription_id = (int) $subscription->get_id();
25
-			$url             = esc_url( $subscription->get_view_url() );
26
-			$id_label        = sprintf(
27
-				esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
-				(int) $subscription->get_id()
29
-			);
30
-			echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) );
31
-			break;
23
+        case 'subscription':
24
+            $subscription_id = (int) $subscription->get_id();
25
+            $url             = esc_url( $subscription->get_view_url() );
26
+            $id_label        = sprintf(
27
+                esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
+                (int) $subscription->get_id()
29
+            );
30
+            echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) );
31
+            break;
32 32
 
33
-		case 'status':
34
-			echo esc_html( $subscription->get_status_label() );
35
-			break;
33
+        case 'status':
34
+            echo esc_html( $subscription->get_status_label() );
35
+            break;
36 36
 
37
-		case 'renewal-date':
38
-			$renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
-			echo $subscription->is_active() ? esc_html( $renewal ) : '&mdash;';
40
-			break;
37
+        case 'renewal-date':
38
+            $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
+            echo $subscription->is_active() ? esc_html( $renewal ) : '&mdash;';
40
+            break;
41 41
 
42
-		case 'amount':
43
-			$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
-			$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
-			echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
-			break;
42
+        case 'amount':
43
+            $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
+            $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
+            echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
+            break;
47 47
 
48
-		endswitch;
48
+        endswitch;
49 49
 
50
-		do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
50
+        do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
51 51
 
52
-	echo '</td>';
52
+    echo '</td>';
53 53
 
54 54
 endforeach;
Please login to merge, or discard this patch.
Switch Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -20,35 +20,35 @@
 block discarded – undo
20 20
 
21 21
 		switch ( $column ) :
22 22
 
23
-		case 'subscription':
24
-			$subscription_id = (int) $subscription->get_id();
25
-			$url             = esc_url( $subscription->get_view_url() );
26
-			$id_label        = sprintf(
27
-				esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
-				(int) $subscription->get_id()
29
-			);
30
-			echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) );
31
-			break;
32
-
33
-		case 'status':
34
-			echo esc_html( $subscription->get_status_label() );
35
-			break;
36
-
37
-		case 'renewal-date':
38
-			$renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
-			echo $subscription->is_active() ? esc_html( $renewal ) : '&mdash;';
40
-			break;
41
-
42
-		case 'amount':
43
-			$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
-			$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
-			echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
-			break;
47
-
48
-		endswitch;
49
-
50
-		do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
51
-
52
-	echo '</td>';
53
-
54
-endforeach;
23
+		    case 'subscription':
24
+			    $subscription_id = (int) $subscription->get_id();
25
+			    $url             = esc_url( $subscription->get_view_url() );
26
+			    $id_label        = sprintf(
27
+				    esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
28
+				    (int) $subscription->get_id()
29
+			    );
30
+			    echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) );
31
+			    break;
32
+
33
+		    case 'status':
34
+			    echo esc_html( $subscription->get_status_label() );
35
+			    break;
36
+
37
+		    case 'renewal-date':
38
+			    $renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
+			    echo $subscription->is_active() ? esc_html( $renewal ) : '&mdash;';
40
+			    break;
41
+
42
+		    case 'amount':
43
+			    $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
+			    $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
+			    echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
46
+			    break;
47
+
48
+		    endswitch;
49
+
50
+		    do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
51
+
52
+	    echo '</td>';
53
+
54
+    endforeach;
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@
 block discarded – undo
9 9
  * @var WPInv_Subscriptions_Widget $widget
10 10
  */
11 11
 
12
-defined( 'ABSPATH' ) || exit;
12
+defined('ABSPATH') || exit;
13 13
 
14
-foreach ( array_keys( $widget->get_subscriptions_table_columns() ) as $column ) :
14
+foreach (array_keys($widget->get_subscriptions_table_columns()) as $column) :
15 15
 
16
-	$class = sanitize_html_class( $column );
17
-	echo "<td class='getpaid-subscriptions-table-column-" . esc_attr( $class ) . "'>";
16
+	$class = sanitize_html_class($column);
17
+	echo "<td class='getpaid-subscriptions-table-column-" . esc_attr($class) . "'>";
18 18
 
19
-		do_action( "getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription );
19
+		do_action("getpaid_subscriptions_before_frontend_subscription_table_$column", $subscription);
20 20
 
21
-		switch ( $column ) :
21
+		switch ($column) :
22 22
 
23 23
 		case 'subscription':
24 24
 			$subscription_id = (int) $subscription->get_id();
25
-			$url             = esc_url( $subscription->get_view_url() );
25
+			$url             = esc_url($subscription->get_view_url());
26 26
 			$id_label        = sprintf(
27
-				esc_attr_x( '#%s', 'subscription id', 'invoicing' ),
27
+				esc_attr_x('#%s', 'subscription id', 'invoicing'),
28 28
 				(int) $subscription->get_id()
29 29
 			);
30
-			echo wp_kses_post( $widget->add_row_actions( "<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription ) );
30
+			echo wp_kses_post($widget->add_row_actions("<a href='$url' class='font-weight-bold text-decoration-none'>$id_label</a>", $subscription));
31 31
 			break;
32 32
 
33 33
 		case 'status':
34
-			echo esc_html( $subscription->get_status_label() );
34
+			echo esc_html($subscription->get_status_label());
35 35
 			break;
36 36
 
37 37
 		case 'renewal-date':
38
-			$renewal = getpaid_format_date_value( $subscription->get_next_renewal_date() );
39
-			echo $subscription->is_active() ? esc_html( $renewal ) : '&mdash;';
38
+			$renewal = getpaid_format_date_value($subscription->get_next_renewal_date());
39
+			echo $subscription->is_active() ? esc_html($renewal) : '&mdash;';
40 40
 			break;
41 41
 
42 42
 		case 'amount':
43
-			$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
44
-			$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
45
-			echo wp_kses_post( "<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>" );
43
+			$frequency = getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), '');
44
+			$amount    = wpinv_price($subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency());
45
+			echo wp_kses_post("<span>$amount</span> / <span class='getpaid-item-recurring-period'>$frequency</span>");
46 46
 			break;
47 47
 
48 48
 		endswitch;
49 49
 
50
-		do_action( "getpaid_subscriptions_frontend_subscription_table_$column", $subscription );
50
+		do_action("getpaid_subscriptions_frontend_subscription_table_$column", $subscription);
51 51
 
52 52
 	echo '</td>';
53 53
 
Please login to merge, or discard this patch.
includes/admin/views/wizard-introduction.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -4,78 +4,78 @@  discard block
 block discarded – undo
4 4
  *
5 5
  */
6 6
 
7
-defined( 'ABSPATH' ) || exit;
7
+defined('ABSPATH') || exit;
8 8
 
9 9
 ?>
10 10
 
11 11
 <div class="card shadow-sm my-5">
12 12
 
13 13
     <h1 class="h4 card-header bg-white border-bottom-0 pt-4 pb-1">
14
-        <?php esc_html_e( 'Welcome to the GetPaid Setup Wizard!', 'invoicing' ); ?>
14
+        <?php esc_html_e('Welcome to the GetPaid Setup Wizard!', 'invoicing'); ?>
15 15
     </h1>
16 16
 
17 17
     <div class="card-body text-muted ">
18
-        <p><?php esc_html_e( 'Thank you for choosing GetPaid - The most Powerful Payments Plugin for WordPress', 'invoicing' ); ?></p>
18
+        <p><?php esc_html_e('Thank you for choosing GetPaid - The most Powerful Payments Plugin for WordPress', 'invoicing'); ?></p>
19 19
         <hr class="mt-4 pt-3 pb-0" />
20
-        <p class="small"><?php echo wp_kses_post( __( 'This quick setup wizard will help you <b>configure the basic settings</b>. It’s <b>completely optional</b> and shouldn’t take longer than <b>five minutes</b>.', 'invoicing' ) ); ?></p>
20
+        <p class="small"><?php echo wp_kses_post(__('This quick setup wizard will help you <b>configure the basic settings</b>. It’s <b>completely optional</b> and shouldn’t take longer than <b>five minutes</b>.', 'invoicing')); ?></p>
21 21
     </div>
22 22
 
23 23
     <div class="card-footer mb-0 bg-white gp-setup-actions step border-top-0">
24 24
         <a
25
-            href="<?php echo esc_url( $next_url ); ?>"
26
-            class="btn btn-primary button-next"><?php esc_html_e( "Let's go!", 'invoicing' ); ?></a>
25
+            href="<?php echo esc_url($next_url); ?>"
26
+            class="btn btn-primary button-next"><?php esc_html_e("Let's go!", 'invoicing'); ?></a>
27 27
         <a
28
-            href="<?php echo esc_url( admin_url() ); ?>"
29
-            class="btn btn-link d-block mt-2 "><?php esc_html_e( 'Not right now', 'invoicing' ); ?></a>
28
+            href="<?php echo esc_url(admin_url()); ?>"
29
+            class="btn btn-link d-block mt-2 "><?php esc_html_e('Not right now', 'invoicing'); ?></a>
30 30
     </div>
31 31
 </div>
32 32
 
33 33
 <div class="card shadow-sm my-5 overflow-hidden">
34 34
     <h1 class="h4 card-header bg-white border-bottom-0  pt-4 pb-1">
35
-        <?php esc_html_e( 'GetPaid Features & Addons!', 'invoicing' ); ?>
35
+        <?php esc_html_e('GetPaid Features & Addons!', 'invoicing'); ?>
36 36
     </h1>
37 37
 
38 38
     <div class="card-body text-muted overflow-hidden">
39
-		<p><?php esc_html_e( 'Collect one time & recurring payments online within minutes. No complex setup required.', 'invoicing' ); ?></p>
39
+		<p><?php esc_html_e('Collect one time & recurring payments online within minutes. No complex setup required.', 'invoicing'); ?></p>
40 40
 		<hr>
41 41
 
42 42
 		<div class="row row-cols-2 text-left">
43 43
 			<div class="col mt-3">
44 44
 				<div class="media">
45
-                    <img src="<?php echo esc_url( WPINV_PLUGIN_URL . 'assets/images/buy.svg' ); ?>" class="mr-3" alt="...">
45
+                    <img src="<?php echo esc_url(WPINV_PLUGIN_URL . 'assets/images/buy.svg'); ?>" class="mr-3" alt="...">
46 46
                     <div class="media-body">
47
-                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e( 'GetPaid via Buy Now Buttons', 'invoicing' ); ?></h6>
48
-                        <small><?php esc_html_e( 'Sell via buy now buttons anywhere on your site', 'invoicing' ); ?></small>
47
+                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e('GetPaid via Buy Now Buttons', 'invoicing'); ?></h6>
48
+                        <small><?php esc_html_e('Sell via buy now buttons anywhere on your site', 'invoicing'); ?></small>
49 49
                     </div>
50 50
                 </div>
51 51
 			</div>
52 52
 
53 53
             <div class="col mt-3">
54 54
                 <div class="media">
55
-                    <img src="<?php echo esc_url( WPINV_PLUGIN_URL . 'assets/images/report.svg' ); ?>" class="mr-3" alt="...">
55
+                    <img src="<?php echo esc_url(WPINV_PLUGIN_URL . 'assets/images/report.svg'); ?>" class="mr-3" alt="...">
56 56
                         <div class="media-body">
57
-                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e( 'GetPaid via payment form', 'invoicing' ); ?></h6>
58
-                        <small><?php esc_html_e( 'Payment forms are conversion-optimized checkout forms', 'invoicing' ); ?></small>
57
+                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e('GetPaid via payment form', 'invoicing'); ?></h6>
58
+                        <small><?php esc_html_e('Payment forms are conversion-optimized checkout forms', 'invoicing'); ?></small>
59 59
                     </div>
60 60
                 </div>
61 61
 		    </div>
62 62
 
63 63
             <div class="col mt-3">
64 64
                 <div class="media">
65
-                    <img src="<?php echo esc_url( WPINV_PLUGIN_URL . 'assets/images/invoices.svg' ); ?>" class="mr-3" alt="...">
65
+                    <img src="<?php echo esc_url(WPINV_PLUGIN_URL . 'assets/images/invoices.svg'); ?>" class="mr-3" alt="...">
66 66
                     <div class="media-body">
67
-                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e( 'GetPaid via Invoice', 'invoicing' ); ?></h6>
68
-                        <small><?php esc_html_e( 'Create and send invoices for just about anything from the WordPress dashboard', 'invoicing' ); ?></small>
67
+                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e('GetPaid via Invoice', 'invoicing'); ?></h6>
68
+                        <small><?php esc_html_e('Create and send invoices for just about anything from the WordPress dashboard', 'invoicing'); ?></small>
69 69
                     </div>
70 70
                 </div>
71 71
 		    </div>
72 72
 
73 73
             <div class="col mt-3">
74 74
                 <div class="media">
75
-                    <img src="<?php echo esc_url( WPINV_PLUGIN_URL . 'assets/images/payment.svg' ); ?>" class="mr-3" alt="...">
75
+                    <img src="<?php echo esc_url(WPINV_PLUGIN_URL . 'assets/images/payment.svg'); ?>" class="mr-3" alt="...">
76 76
                     <div class="media-body">
77
-                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e( 'Affordable payment gateways', 'invoicing' ); ?></h6>
78
-                        <small><?php esc_html_e( 'On average our gateways are over 66% cheaper than our competition', 'invoicing' ); ?></small>
77
+                        <h6 class="mt-0 font-weight-bold"><?php esc_html_e('Affordable payment gateways', 'invoicing'); ?></h6>
78
+                        <small><?php esc_html_e('On average our gateways are over 66% cheaper than our competition', 'invoicing'); ?></small>
79 79
                     </div>
80 80
                 </div>
81 81
 		    </div>
@@ -86,51 +86,51 @@  discard block
 block discarded – undo
86 86
 	<div class="mt-5">
87 87
 		<a
88 88
             href="https://wpgetpaid.com/features-list/"
89
-			class="btn btn-primary"><?php esc_html_e( 'View All Features!', 'invoicing' ); ?></a>
89
+			class="btn btn-primary"><?php esc_html_e('View All Features!', 'invoicing'); ?></a>
90 90
 	</div>
91 91
 
92 92
 	<div class="mt-5 mx-n4 py-4" style="background:#eafaf6;">
93
-		<h4 class="mt-0 font-weight-bold text-dark mb-4"><?php esc_html_e( 'More with Membership!', 'invoicing' ); ?></h4>
93
+		<h4 class="mt-0 font-weight-bold text-dark mb-4"><?php esc_html_e('More with Membership!', 'invoicing'); ?></h4>
94 94
 		<div class="row row-cols-2 text-left px-5">
95 95
 
96 96
 			<div class="col">
97 97
 				<ul class="list-unstyled">
98
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'PDF Invoices', 'invoicing' ); ?></li>
99
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'Gravity Forms', 'invoicing' ); ?></li>
100
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'Contact form 7', 'invoicing' ); ?></li>
101
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'AffiliateWP Integration', 'invoicing' ); ?></li>
98
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('PDF Invoices', 'invoicing'); ?></li>
99
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('Gravity Forms', 'invoicing'); ?></li>
100
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('Contact form 7', 'invoicing'); ?></li>
101
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('AffiliateWP Integration', 'invoicing'); ?></li>
102 102
 				</ul>
103 103
 			</div>
104 104
 
105 105
 			<div class="col">
106 106
 				<ul class="list-unstyled">
107
-			    	<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'Ninja forms', 'invoicing' ); ?></li>
108
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'Digital Downloads', 'invoicing' ); ?></li>
109
-					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e( 'Wallet', 'invoicing' ); ?></li>
107
+			    	<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('Ninja forms', 'invoicing'); ?></li>
108
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('Digital Downloads', 'invoicing'); ?></li>
109
+					<li class="my-2"><i class="far fa-check-circle text-success"></i> <?php esc_html_e('Wallet', 'invoicing'); ?></li>
110 110
 				</ul>
111 111
 			</div>
112 112
 		</div>
113 113
 
114
-		<h5 class="mt-4 font-weight-bold text-dark mb-3"><?php esc_html_e( 'Membership Starts From', 'invoicing' ); ?></h5>
115
-		<h1 class="mt-0 font-weight-bold text-dark mb-4 display-3"><?php esc_html_e( '$49', 'invoicing' ); ?></h1>
114
+		<h5 class="mt-4 font-weight-bold text-dark mb-3"><?php esc_html_e('Membership Starts From', 'invoicing'); ?></h5>
115
+		<h1 class="mt-0 font-weight-bold text-dark mb-4 display-3"><?php esc_html_e('$49', 'invoicing'); ?></h1>
116 116
 
117 117
 		<div class="mt-2">
118 118
 			<a
119 119
                 href="https://wpgetpaid.com/downloads/membership/"
120
-				class="btn btn-primary"><?php esc_html_e( 'Buy Membership Now!', 'invoicing' ); ?></a>
120
+				class="btn btn-primary"><?php esc_html_e('Buy Membership Now!', 'invoicing'); ?></a>
121 121
 		</div>
122 122
 
123 123
 	</div>
124 124
 
125 125
     <div class="card-footer mb-0 bg-white gp-setup-actions step border-top-0">
126 126
         <a
127
-            href="<?php echo esc_url( $next_url ); ?>"
128
-            class="btn btn-outline-primary button-next"><?php esc_html_e( 'Launch the Setup Wizard!', 'invoicing' ); ?></a>
127
+            href="<?php echo esc_url($next_url); ?>"
128
+            class="btn btn-outline-primary button-next"><?php esc_html_e('Launch the Setup Wizard!', 'invoicing'); ?></a>
129 129
         <a
130 130
             href="https://docs.wpgetpaid.com/"
131
-            class="btn btn-outline-primary ml-4"><?php esc_html_e( 'Documentation', 'invoicing' ); ?></a>
131
+            class="btn btn-outline-primary ml-4"><?php esc_html_e('Documentation', 'invoicing'); ?></a>
132 132
         <a
133
-            href="<?php echo esc_url( admin_url() ); ?>"
134
-            class="btn btn-link d-block mt-2 "><?php esc_html_e( 'Not right now', 'invoicing' ); ?></a>
133
+            href="<?php echo esc_url(admin_url()); ?>"
134
+            class="btn btn-link d-block mt-2 "><?php esc_html_e('Not right now', 'invoicing'); ?></a>
135 135
     </div>
136 136
 </div>
Please login to merge, or discard this patch.
templates/payment-forms-admin/previews/gateway_select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@
 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
 aui()->alert(
13 13
     array(
14
-        'content' => esc_html__( 'The gateway select box will appear here', 'invoicing' ),
14
+        'content' => esc_html__('The gateway select box will appear here', 'invoicing'),
15 15
         'type'    => 'info',
16 16
     ),
17 17
     true
Please login to merge, or discard this patch.