Passed
Push — master ( 69e6d2...8b22fd )
by Brian
04:39
created
templates/invoice/header-left-actions.php 1 patch
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.
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.
templates/subscriptions/subscription-details.php 3 patches
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -46,62 +46,62 @@  discard block
 block discarded – undo
46 46
 				<td style="width: 65%">
47 47
 					<?php
48 48
 
49
-						switch ( $key ) {
49
+                        switch ( $key ) {
50 50
 
51
-						case 'status':
52
-							echo esc_html( $subscription->get_status_label() );
53
-							break;
51
+                        case 'status':
52
+                            echo esc_html( $subscription->get_status_label() );
53
+                            break;
54 54
 
55
-						case 'start_date':
56
-							echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
57
-							break;
55
+                        case 'start_date':
56
+                            echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
57
+                            break;
58 58
 
59
-						case 'expiry_date':
60
-							echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
61
-							break;
59
+                        case 'expiry_date':
60
+                            echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
61
+                            break;
62 62
 
63
-						case 'initial_amount':
64
-							echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) );
63
+                        case 'initial_amount':
64
+                            echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) );
65 65
 
66
-							if ( $subscription->has_trial_period() ) {
66
+                            if ( $subscription->has_trial_period() ) {
67 67
 
68
-								echo "<small class='text-muted'>&nbsp;";
69
-								printf(
70
-									esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
71
-									esc_html( $subscription->get_trial_period() )
72
-								);
73
-								echo '</small>';
68
+                                echo "<small class='text-muted'>&nbsp;";
69
+                                printf(
70
+                                    esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
71
+                                    esc_html( $subscription->get_trial_period() )
72
+                                );
73
+                                echo '</small>';
74 74
 
75
-							}
75
+                            }
76 76
 
77
-							break;
77
+                            break;
78 78
 
79
-						case 'recurring_amount':
80
-							$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
81
-							$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
82
-							echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) );
83
-							break;
79
+                        case 'recurring_amount':
80
+                            $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
81
+                            $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
82
+                            echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) );
83
+                            break;
84 84
 
85
-						case 'item':
86
-							if ( empty( $subscription_group ) ) {
87
-								echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) );
88
-								} else {
89
-								$markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
90
-								echo wp_kses_post( implode( ' | ', $markup ) );
91
-								}
85
+                        case 'item':
86
+                            if ( empty( $subscription_group ) ) {
87
+                                echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) );
88
+                                } else {
89
+                                $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
90
+                                echo wp_kses_post( implode( ' | ', $markup ) );
91
+                                }
92 92
 
93
-							break;
93
+                            break;
94 94
 
95
-						case 'payments':
96
-							$max_activations = (int) $subscription->get_bill_times();
97
-							echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '&infin;' : (int) $max_activations );
95
+                        case 'payments':
96
+                            $max_activations = (int) $subscription->get_bill_times();
97
+                            echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '&infin;' : (int) $max_activations );
98 98
 
99
-							break;
99
+                            break;
100 100
 
101
-						}
102
-						do_action( "getpaid_render_single_subscription_column_$key", $subscription );
101
+                        }
102
+                        do_action( "getpaid_render_single_subscription_column_$key", $subscription );
103 103
 
104
-					?>
104
+                    ?>
105 105
 				</td>
106 106
 
107 107
 			</tr>
@@ -128,17 +128,17 @@  discard block
 block discarded – undo
128 128
 <span class="form-text">
129 129
 
130 130
 	<?php
131
-		if ( $subscription->can_cancel() ) {
132
-		printf(
131
+        if ( $subscription->can_cancel() ) {
132
+        printf(
133 133
             '<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a>&nbsp;&nbsp;',
134 134
             esc_url( $subscription->get_cancel_url() ),
135 135
             esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ),
136 136
             esc_html__( 'Cancel Subscription', 'invoicing' )
137 137
         );
138
-		}
138
+        }
139 139
 
140
-		do_action( 'getpaid-single-subscription-page-actions', $subscription );
141
-	?>
140
+        do_action( 'getpaid-single-subscription-page-actions', $subscription );
141
+    ?>
142 142
 
143 143
 	<a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e( 'Go Back', 'invoicing' ); ?></a>
144 144
 </span>
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -9,58 +9,58 @@  discard block
 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
-do_action( 'getpaid_single_subscription_before_notices', $subscription );
14
+do_action('getpaid_single_subscription_before_notices', $subscription);
15 15
 
16 16
 // Display errors and notices.
17 17
 wpinv_print_errors();
18 18
 
19
-$subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() );
20
-$subscription_group  = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() );
19
+$subscription_groups = getpaid_get_invoice_subscription_groups($subscription->get_parent_invoice_id());
20
+$subscription_group  = getpaid_get_invoice_subscription_group($subscription->get_parent_invoice_id(), $subscription->get_id());
21 21
 
22
-do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups );
22
+do_action('getpaid_before_single_subscription', $subscription, $subscription_groups);
23 23
 
24 24
 ?>
25 25
 
26
-<h2 class="mb-1 h4"><?php esc_html_e( 'Subscription Details', 'invoicing' ); ?></h2>
26
+<h2 class="mb-1 h4"><?php esc_html_e('Subscription Details', 'invoicing'); ?></h2>
27 27
 <table class="table table-bordered">
28 28
 	<tbody>
29 29
 
30
-		<?php foreach ( $widget->get_single_subscription_columns( $subscription ) as $key => $label ) : ?>
30
+		<?php foreach ($widget->get_single_subscription_columns($subscription) as $key => $label) : ?>
31 31
 
32
-			<tr class="getpaid-subscription-meta-<?php echo esc_attr( $key ); ?>">
32
+			<tr class="getpaid-subscription-meta-<?php echo esc_attr($key); ?>">
33 33
 
34 34
 				<th class="font-weight-bold" style="width: 35%">
35
-					<?php echo esc_html( $label ); ?>
35
+					<?php echo esc_html($label); ?>
36 36
 				</th>
37 37
 
38 38
 				<td style="width: 65%">
39 39
 					<?php
40 40
 
41
-						switch ( $key ) {
41
+						switch ($key) {
42 42
 
43 43
 						case 'status':
44
-							echo esc_html( $subscription->get_status_label() );
44
+							echo esc_html($subscription->get_status_label());
45 45
 							break;
46 46
 
47 47
 						case 'start_date':
48
-							echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
48
+							echo esc_html(getpaid_format_date_value($subscription->get_date_created()));
49 49
 							break;
50 50
 
51 51
 						case 'expiry_date':
52
-							echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
52
+							echo esc_html(getpaid_format_date_value($subscription->get_next_renewal_date()));
53 53
 							break;
54 54
 
55 55
 						case 'initial_amount':
56
-							echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) );
56
+							echo wp_kses_post(wpinv_price($subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency()));
57 57
 
58
-							if ( $subscription->has_trial_period() ) {
58
+							if ($subscription->has_trial_period()) {
59 59
 
60 60
 								echo "<small class='text-muted'>&nbsp;";
61 61
 								printf(
62
-									esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
63
-									esc_html( $subscription->get_trial_period() )
62
+									esc_html_x('( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing'),
63
+									esc_html($subscription->get_trial_period())
64 64
 								);
65 65
 								echo '</small>';
66 66
 
@@ -69,29 +69,29 @@  discard block
 block discarded – undo
69 69
 							break;
70 70
 
71 71
 						case 'recurring_amount':
72
-							$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
73
-							$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
74
-							echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) );
72
+							$frequency = getpaid_get_subscription_period_label($subscription->get_period(), $subscription->get_frequency(), '');
73
+							$amount    = wpinv_price($subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency());
74
+							echo wp_kses_post(strtolower("<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>"));
75 75
 							break;
76 76
 
77 77
 						case 'item':
78
-							if ( empty( $subscription_group ) ) {
79
-								echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) );
78
+							if (empty($subscription_group)) {
79
+								echo wp_kses_post(WPInv_Subscriptions_List_Table::generate_item_markup($subscription->get_product_id()));
80 80
 								} else {
81
-								$markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
82
-								echo wp_kses_post( implode( ' | ', $markup ) );
81
+								$markup = array_map(array('WPInv_Subscriptions_List_Table', 'generate_item_markup'), array_keys($subscription_group['items']));
82
+								echo wp_kses_post(implode(' | ', $markup));
83 83
 								}
84 84
 
85 85
 							break;
86 86
 
87 87
 						case 'payments':
88 88
 							$max_activations = (int) $subscription->get_bill_times();
89
-							echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '&infin;' : (int) $max_activations );
89
+							echo ((int) $subscription->get_times_billed()) . ' / ' . (empty($max_activations) ? '&infin;' : (int) $max_activations);
90 90
 
91 91
 							break;
92 92
 
93 93
 						}
94
-						do_action( "getpaid_render_single_subscription_column_$key", $subscription );
94
+						do_action("getpaid_render_single_subscription_column_$key", $subscription);
95 95
 
96 96
 					?>
97 97
 				</td>
@@ -103,34 +103,34 @@  discard block
 block discarded – undo
103 103
 	</tbody>
104 104
 </table>
105 105
 
106
-<?php if ( ! empty( $subscription_group ) ) : ?>
107
-	<h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Subscription Items', 'invoicing' ); ?></h2>
108
-	<?php getpaid_admin_subscription_item_details_metabox( $subscription ); ?>
106
+<?php if (!empty($subscription_group)) : ?>
107
+	<h2 class='mt-5 mb-1 h4'><?php esc_html_e('Subscription Items', 'invoicing'); ?></h2>
108
+	<?php getpaid_admin_subscription_item_details_metabox($subscription); ?>
109 109
 <?php endif; ?>
110 110
 
111
-<h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Related Invoices', 'invoicing' ); ?></h2>
111
+<h2 class='mt-5 mb-1 h4'><?php esc_html_e('Related Invoices', 'invoicing'); ?></h2>
112 112
 
113
-<?php echo wp_kses_post( getpaid_admin_subscription_invoice_details_metabox( $subscription ) ); ?>
113
+<?php echo wp_kses_post(getpaid_admin_subscription_invoice_details_metabox($subscription)); ?>
114 114
 
115
-<?php if ( 1 < count( $subscription_groups ) ) : ?>
116
-	<h2 class='mt-5 mb-1 h4'><?php esc_html_e( 'Related Subscriptions', 'invoicing' ); ?></h2>
117
-	<?php getpaid_admin_subscription_related_subscriptions_metabox( $subscription ); ?>
115
+<?php if (1 < count($subscription_groups)) : ?>
116
+	<h2 class='mt-5 mb-1 h4'><?php esc_html_e('Related Subscriptions', 'invoicing'); ?></h2>
117
+	<?php getpaid_admin_subscription_related_subscriptions_metabox($subscription); ?>
118 118
 <?php endif; ?>
119 119
 
120 120
 <span class="form-text">
121 121
 
122 122
 	<?php
123
-		if ( $subscription->can_cancel() ) {
123
+		if ($subscription->can_cancel()) {
124 124
 		printf(
125 125
             '<a href="%s" class="btn btn-danger btn-sm" onclick="return confirm(\'%s\')">%s</a>&nbsp;&nbsp;',
126
-            esc_url( $subscription->get_cancel_url() ),
127
-            esc_attr__( 'Are you sure you want to cancel this subscription?', 'invoicing' ),
128
-            esc_html__( 'Cancel Subscription', 'invoicing' )
126
+            esc_url($subscription->get_cancel_url()),
127
+            esc_attr__('Are you sure you want to cancel this subscription?', 'invoicing'),
128
+            esc_html__('Cancel Subscription', 'invoicing')
129 129
         );
130 130
 		}
131 131
 
132
-		do_action( 'getpaid-single-subscription-page-actions', $subscription );
132
+		do_action('getpaid-single-subscription-page-actions', $subscription);
133 133
 	?>
134 134
 
135
-	<a href="<?php echo esc_url( getpaid_get_tab_url( 'gp-subscriptions', get_permalink( (int) wpinv_get_option( 'invoice_subscription_page' ) ) ) ); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e( 'Go Back', 'invoicing' ); ?></a>
135
+	<a href="<?php echo esc_url(getpaid_get_tab_url('gp-subscriptions', get_permalink((int) wpinv_get_option('invoice_subscription_page')))); ?>" class="btn btn-secondary btn-sm"><?php esc_html_e('Go Back', 'invoicing'); ?></a>
136 136
 </span>
Please login to merge, or discard this patch.
Switch Indentation   +48 added lines, -48 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
 /**
4 4
  * Template that prints a single subscription's details
@@ -10,19 +10,19 @@  discard block
 block discarded – undo
10 10
  * @var WPInv_Subscriptions_Widget $widget
11 11
  */
12 12
 
13
-defined( 'ABSPATH' ) || exit;
13
+    defined( 'ABSPATH' ) || exit;
14 14
 
15
-do_action( 'getpaid_single_subscription_before_notices', $subscription );
15
+    do_action( 'getpaid_single_subscription_before_notices', $subscription );
16 16
 
17
-// Display errors and notices.
18
-wpinv_print_errors();
17
+    // Display errors and notices.
18
+    wpinv_print_errors();
19 19
 
20
-$subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() );
21
-$subscription_group  = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() );
20
+    $subscription_groups = getpaid_get_invoice_subscription_groups( $subscription->get_parent_invoice_id() );
21
+    $subscription_group  = getpaid_get_invoice_subscription_group( $subscription->get_parent_invoice_id(), $subscription->get_id() );
22 22
 
23
-do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups );
23
+    do_action( 'getpaid_before_single_subscription', $subscription, $subscription_groups );
24 24
 
25
-?>
25
+    ?>
26 26
 
27 27
 <h2 class="mb-1 h4"><?php esc_html_e( 'Subscription Details', 'invoicing' ); ?></h2>
28 28
 <table class="table table-bordered">
@@ -39,59 +39,59 @@  discard block
 block discarded – undo
39 39
 				<td style="width: 65%">
40 40
 					<?php
41 41
 
42
-						switch ( $key ) {
42
+						    switch ( $key ) {
43 43
 
44
-						case 'status':
45
-							echo esc_html( $subscription->get_status_label() );
46
-							break;
44
+						        case 'status':
45
+							        echo esc_html( $subscription->get_status_label() );
46
+							        break;
47 47
 
48
-						case 'start_date':
49
-							echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
50
-							break;
48
+						        case 'start_date':
49
+							        echo esc_html( getpaid_format_date_value( $subscription->get_date_created() ) );
50
+							        break;
51 51
 
52
-						case 'expiry_date':
53
-							echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
54
-							break;
52
+						        case 'expiry_date':
53
+							        echo esc_html( getpaid_format_date_value( $subscription->get_next_renewal_date() ) );
54
+							        break;
55 55
 
56
-						case 'initial_amount':
57
-							echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) );
56
+						        case 'initial_amount':
57
+							        echo wp_kses_post( wpinv_price( $subscription->get_initial_amount(), $subscription->get_parent_payment()->get_currency() ) );
58 58
 
59
-							if ( $subscription->has_trial_period() ) {
59
+							        if ( $subscription->has_trial_period() ) {
60 60
 
61
-								echo "<small class='text-muted'>&nbsp;";
62
-								printf(
63
-									esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
64
-									esc_html( $subscription->get_trial_period() )
65
-								);
66
-								echo '</small>';
61
+								        echo "<small class='text-muted'>&nbsp;";
62
+								        printf(
63
+									        esc_html_x( '( %1$s trial )', 'Subscription trial period. (e.g.: 1 month trial)', 'invoicing' ),
64
+									        esc_html( $subscription->get_trial_period() )
65
+								        );
66
+								        echo '</small>';
67 67
 
68
-							}
68
+							        }
69 69
 
70
-							break;
70
+							        break;
71 71
 
72
-						case 'recurring_amount':
73
-							$frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
74
-							$amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
75
-							echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) );
76
-							break;
72
+						        case 'recurring_amount':
73
+							        $frequency = getpaid_get_subscription_period_label( $subscription->get_period(), $subscription->get_frequency(), '' );
74
+							        $amount    = wpinv_price( $subscription->get_recurring_amount(), $subscription->get_parent_payment()->get_currency() );
75
+							        echo wp_kses_post( strtolower( "<strong style='font-weight: 500;'>$amount</strong> / <span class='getpaid-item-recurring-period'>$frequency</span>" ) );
76
+							        break;
77 77
 
78
-						case 'item':
79
-							if ( empty( $subscription_group ) ) {
80
-								echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) );
81
-								} else {
82
-								$markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
83
-								echo wp_kses_post( implode( ' | ', $markup ) );
84
-								}
78
+						        case 'item':
79
+							        if ( empty( $subscription_group ) ) {
80
+								        echo wp_kses_post( WPInv_Subscriptions_List_Table::generate_item_markup( $subscription->get_product_id() ) );
81
+								        } else {
82
+								        $markup = array_map( array( 'WPInv_Subscriptions_List_Table', 'generate_item_markup' ), array_keys( $subscription_group['items'] ) );
83
+								        echo wp_kses_post( implode( ' | ', $markup ) );
84
+								        }
85 85
 
86
-							break;
86
+							        break;
87 87
 
88
-						case 'payments':
89
-							$max_activations = (int) $subscription->get_bill_times();
90
-							echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '&infin;' : (int) $max_activations );
88
+						        case 'payments':
89
+							        $max_activations = (int) $subscription->get_bill_times();
90
+							        echo ( (int) $subscription->get_times_billed() ) . ' / ' . ( empty( $max_activations ) ? '&infin;' : (int) $max_activations );
91 91
 
92
-							break;
92
+							        break;
93 93
 
94
-						}
94
+						    }
95 95
 						do_action( "getpaid_render_single_subscription_column_$key", $subscription );
96 96
 
97 97
 					?>
Please login to merge, or discard this patch.
includes/admin/views/wizard-thank-you.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -4,68 +4,68 @@
 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
 	<div class="text-center card-body">
13
-		<h1 class="h3"><?php esc_html_e( 'Awesome, you are ready to Get Paid', 'invoicing' ); ?></h1>
13
+		<h1 class="h3"><?php esc_html_e('Awesome, you are ready to Get Paid', 'invoicing'); ?></h1>
14 14
 
15 15
 		<div class="geodirectory-message geodirectory-tracker">
16
-			<p><?php esc_html_e( 'Thank you for choosing GetPaid!', 'invoicing' ); ?> <i class="far fa-smile-beam"></i></p>
16
+			<p><?php esc_html_e('Thank you for choosing GetPaid!', 'invoicing'); ?> <i class="far fa-smile-beam"></i></p>
17 17
 		</div>
18 18
 
19 19
 		<div class="gp-setup-next-steps">
20 20
 			<div class="gp-setup-next-steps-first mb-4">
21 21
 				<div>
22
-					<h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e( 'Watch This', 'invoicing' ); ?> <i class="fas fa-arrow-down"></i></h2>
22
+					<h2 class="h3"><i class="fas fa-arrow-down"></i> <?php esc_html_e('Watch This', 'invoicing'); ?> <i class="fas fa-arrow-down"></i></h2>
23 23
 					<div class="embed-responsive embed-responsive-16by9 mb-4">
24 24
 						<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/TXZuPXHjt9E?rel=0" allowfullscreen></iframe>
25 25
 					</div>
26 26
 				</div>
27
-				<h2 class="h3"><?php esc_html_e( 'Next steps', 'invoicing' ); ?></h2>
27
+				<h2 class="h3"><?php esc_html_e('Next steps', 'invoicing'); ?></h2>
28 28
 
29 29
 				<div class="d-flex justify-content-between">
30 30
 					<a
31 31
 						class="btn btn-outline-primary btn-sm"
32
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_item' ) ); ?>">
32
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_item')); ?>">
33 33
 						<span class="h1 d-block"><i class="fas fa-box-open"></i></span>
34
-						<?php esc_html_e( 'Create Item', 'invoicing' ); ?>
34
+						<?php esc_html_e('Create Item', 'invoicing'); ?>
35 35
 					</a>
36 36
 					<a
37 37
 						class="btn btn-outline-primary btn-sm"
38
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_payment_form' ) ); ?>">
38
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_payment_form')); ?>">
39 39
 						<span class="h1 d-block"><i class="fas fa-align-justify"></i></span>
40
-						<?php esc_html_e( 'Create Payment Form', 'invoicing' ); ?>
40
+						<?php esc_html_e('Create Payment Form', 'invoicing'); ?>
41 41
 					</a>
42 42
 					<a
43 43
 						class="btn btn-outline-primary btn-sm"
44
-						href="<?php echo esc_url( admin_url( 'post-new.php?post_type=wpi_invoice' ) ); ?>">
44
+						href="<?php echo esc_url(admin_url('post-new.php?post_type=wpi_invoice')); ?>">
45 45
 						<span class="h1 d-block"><i class="fas fa-file-alt"></i></span>
46
-						<?php esc_html_e( 'Create Invoice', 'invoicing' ); ?>
46
+						<?php esc_html_e('Create Invoice', 'invoicing'); ?>
47 47
 					</a>
48 48
 				</div>
49 49
 
50 50
 
51 51
 
52
-						<h2 class="h3 mt-4"><?php esc_html_e( 'Learn more', 'invoicing' ); ?></h2>
52
+						<h2 class="h3 mt-4"><?php esc_html_e('Learn more', 'invoicing'); ?></h2>
53 53
 				<div class="gp-setup-next-steps-last mt-2 d-flex justify-content-between">
54 54
 						<a
55 55
 							class="btn btn-outline-primary btn-sm" href="https://docs.wpgetpaid.com/collection/114-getting-started?utm_source=setupwizard&utm_medium=product&utm_content=getting-started&utm_campaign=invoicingplugin"
56
-							target="_blank"><?php esc_html_e( 'Getting Started', 'invoicing' ); ?></a>
56
+							target="_blank"><?php esc_html_e('Getting Started', 'invoicing'); ?></a>
57 57
 						<a
58 58
 							class="btn btn-outline-primary btn-sm"
59 59
 							href="https://docs.wpgetpaid.com/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingplugin"
60
-							target="_blank"><?php esc_html_e( 'Documentation', 'invoicing' ); ?></a>
60
+							target="_blank"><?php esc_html_e('Documentation', 'invoicing'); ?></a>
61 61
 						<a
62 62
 							class="btn btn-outline-primary btn-sm"
63 63
 							href="https://wpgetpaid.com/support/?utm_source=setupwizard&utm_medium=product&utm_content=docs&utm_campaign=invoicingyplugin"
64
-							target="_blank"><?php esc_html_e( 'Support', 'invoicing' ); ?></a>
64
+							target="_blank"><?php esc_html_e('Support', 'invoicing'); ?></a>
65 65
 						<a
66 66
 							class="btn btn-outline-primary btn-sm"
67 67
 							href="https://demos.ayecode.io/getpaid/?utm_source=setupwizard&utm_medium=product&utm_content=demos&utm_campaign=invoicingyplugin"
68
-							target="_blank"><?php esc_html_e( 'Demos', 'invoicing' ); ?></a>
68
+							target="_blank"><?php esc_html_e('Demos', 'invoicing'); ?></a>
69 69
 					</div>
70 70
 			</div>
71 71
 		</div>
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.
includes/admin/meta-boxes/class-mb-payment-form.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // MUST have WordPress.
3
-if ( ! defined( 'WPINC' ) ) {
3
+if (!defined('WPINC')) {
4 4
     exit;
5 5
 }
6 6
 
@@ -11,23 +11,23 @@  discard block
 block discarded – undo
11 11
      *
12 12
      * @param WP_Post $post
13 13
      */
14
-    public static function output_details( $post ) {
15
-        $details = get_post_meta( $post->ID, 'payment_form_data', true );
14
+    public static function output_details($post) {
15
+        $details = get_post_meta($post->ID, 'payment_form_data', true);
16 16
 
17
-        if ( ! is_array( $details ) ) {
17
+        if (!is_array($details)) {
18 18
             return;
19 19
         }
20 20
 
21 21
         echo '<div class="bsui"> <div class="form-row">';
22 22
 
23
-        foreach ( $details as $key => $value ) {
24
-            $key = esc_html( $key );
23
+        foreach ($details as $key => $value) {
24
+            $key = esc_html($key);
25 25
 
26
-            if ( is_array( $value ) ) {
27
-                $value = implode( ',', $value );
26
+            if (is_array($value)) {
27
+                $value = implode(',', $value);
28 28
             }
29 29
 
30
-            echo wp_kses_post( "<div class='col-12'><strong>$key:</strong></div><div class='col-12 form-group'>$value</div>" );
30
+            echo wp_kses_post("<div class='col-12'><strong>$key:</strong></div><div class='col-12 form-group'>$value</div>");
31 31
         }
32 32
 
33 33
         echo '</div></div>';
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
      *
40 40
      * @param WP_Post $post
41 41
      */
42
-    public static function output_shortcode( $post ) {
42
+    public static function output_shortcode($post) {
43 43
 
44
-        if ( ! is_numeric( $post ) ) {
44
+        if (!is_numeric($post)) {
45 45
             $post = $post->ID;
46 46
         }
47 47
 
48
-        if ( $post == wpinv_get_default_payment_form() ) {
48
+        if ($post == wpinv_get_default_payment_form()) {
49 49
             echo '&mdash;';
50 50
             return;
51 51
         }
52 52
 
53
-        echo "<input type='text' style='min-width: 220px;' value='[getpaid form=" . absint( $post ) . "]' disabled>";
53
+        echo "<input type='text' style='min-width: 220px;' value='[getpaid form=" . absint($post) . "]' disabled>";
54 54
 
55 55
     }
56 56
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/email.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,49 +7,49 @@
 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 class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <div class='form-group form-check'>
42 42
     <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' />
43
-    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label>
43
+    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label>
44 44
 </div>
45 45
 
46 46
 <hr class='featurette-divider mt-4'>
47 47
 
48 48
 <div class='form-group'>
49 49
     <label class="d-block">
50
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
50
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
51 51
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
52
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
52
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
53 53
     </label>
54 54
 </div>
55 55
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/text.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,49 +7,49 @@
 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 class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <div class='form-group form-check'>
42 42
     <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' />
43
-    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label>
43
+    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label>
44 44
 </div>
45 45
 
46 46
 <hr class='featurette-divider mt-4'>
47 47
 
48 48
 <div class='form-group'>
49 49
     <label class="d-block">
50
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
50
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
51 51
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
52
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
52
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
53 53
     </label>
54 54
 </div>
55 55
 
Please login to merge, or discard this patch.
templates/payment-forms-admin/edit/number.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,49 +7,49 @@
 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 class='form-group'>
15 15
     <label class="d-block">
16
-        <span><?php esc_html_e( 'Field Label', 'invoicing' ); ?></span>
16
+        <span><?php esc_html_e('Field Label', 'invoicing'); ?></span>
17 17
         <input v-model='active_form_element.label' class='form-control' type="text"/>
18 18
     </label>
19 19
 </div>
20 20
 
21 21
 <div class='form-group'>
22 22
     <label class="d-block">
23
-        <span><?php esc_html_e( 'Placeholder text', 'invoicing' ); ?></span>
23
+        <span><?php esc_html_e('Placeholder text', 'invoicing'); ?></span>
24 24
         <input v-model='active_form_element.placeholder' class='form-control' type="text"/>
25 25
     </label>
26 26
 </div>
27 27
 
28 28
 <div class='form-group'>
29 29
     <label class="d-block">
30
-        <span><?php esc_html_e( 'Help Text', 'invoicing' ); ?></span>
31
-        <textarea placeholder='<?php esc_attr_e( 'Add some help text for this field', 'invoicing' ); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
-        <small class="form-text text-muted"><?php esc_html_e( 'HTML is allowed', 'invoicing' ); ?></small>
30
+        <span><?php esc_html_e('Help Text', 'invoicing'); ?></span>
31
+        <textarea placeholder='<?php esc_attr_e('Add some help text for this field', 'invoicing'); ?>' v-model='active_form_element.description' class='form-control' rows='3'></textarea>
32
+        <small class="form-text text-muted"><?php esc_html_e('HTML is allowed', 'invoicing'); ?></small>
33 33
     </label>
34 34
 </div>
35 35
 
36 36
 <div class='form-group form-check'>
37 37
     <input :id="active_form_element.id + '_edit'" v-model='active_form_element.required' type='checkbox' class='form-check-input' />
38
-    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e( 'Is this field required?', 'invoicing' ); ?></label>
38
+    <label class='form-check-label' :for="active_form_element.id + '_edit'"><?php esc_html_e('Is this field required?', 'invoicing'); ?></label>
39 39
 </div>
40 40
 
41 41
 <div class='form-group form-check'>
42 42
     <input :id="active_form_element.id + '_add_meta'" v-model='active_form_element.add_meta' type='checkbox' class='form-check-input' />
43
-    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e( 'Show this field in receipts and emails?', 'invoicing' ); ?></label>
43
+    <label class='form-check-label' :for="active_form_element.id + '_add_meta'"><?php esc_html_e('Show this field in receipts and emails?', 'invoicing'); ?></label>
44 44
 </div>
45 45
 
46 46
 <hr class='featurette-divider mt-4'>
47 47
 
48 48
 <div class='form-group'>
49 49
     <label class="d-block">
50
-        <span><?php esc_html_e( 'Email Merge Tag', 'invoicing' ); ?></span>
50
+        <span><?php esc_html_e('Email Merge Tag', 'invoicing'); ?></span>
51 51
         <input :value='active_form_element.label | formatMergeTag' class='form-control bg-white' type="text" readonly onclick="this.select()" />
52
-        <span class="form-text text-muted"><?php esc_html_e( 'You can use this merge tag in notification emails', 'invoicing' ); ?></span>
52
+        <span class="form-text text-muted"><?php esc_html_e('You can use this merge tag in notification emails', 'invoicing'); ?></span>
53 53
     </label>
54 54
 </div>
55 55
 
Please login to merge, or discard this patch.