@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | /** |
3 | 3 | * Displays a discount field in payment form |
4 | 4 | * |
@@ -8,25 +8,25 @@ discard block |
||
8 | 8 | * @var GetPaid_Payment_Form $form The current payment form |
9 | 9 | */ |
10 | 10 | |
11 | -defined( 'ABSPATH' ) || exit; |
|
11 | + defined( 'ABSPATH' ) || exit; |
|
12 | 12 | |
13 | -if ( ! getpaid_has_published_discount() ) { |
|
14 | - return; |
|
13 | + if ( ! getpaid_has_published_discount() ) { |
|
14 | + return; |
|
15 | 15 | } |
16 | 16 | |
17 | -if ( ! empty( $description ) ) { |
|
18 | - $description = "<small class='form-text text-muted'>$description</small>"; |
|
17 | + if ( ! empty( $description ) ) { |
|
18 | + $description = "<small class='form-text text-muted'>$description</small>"; |
|
19 | 19 | } else { |
20 | - $description = ''; |
|
20 | + $description = ''; |
|
21 | 21 | } |
22 | 22 | |
23 | -$discount_code = ''; |
|
24 | -if ( ! empty( $form->invoice ) ) { |
|
25 | - $discount_code = $form->invoice->get_discount_code(); |
|
23 | + $discount_code = ''; |
|
24 | + if ( ! empty( $form->invoice ) ) { |
|
25 | + $discount_code = $form->invoice->get_discount_code(); |
|
26 | 26 | } |
27 | 27 | |
28 | -$class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class ); |
|
29 | -?> |
|
28 | + $class = empty( $class ) ? 'btn-secondary' : sanitize_html_class( $class ); |
|
29 | + ?> |
|
30 | 30 | |
31 | 31 | <div class="form-group mb-3"> |
32 | 32 | <div class="getpaid-discount-field border rounded p-3"> |