@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | |
30 | 30 | $inputs = array(); |
31 | 31 | |
32 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
32 | + foreach ( $payment_methods[ 'choices' ][ 0 ][ 'options' ] as $payment_method => $method_name ) { |
|
33 | 33 | $gateway->set_payment_method( $payment_method ); |
34 | 34 | |
35 | 35 | // Payment method input HTML. |
36 | 36 | $html = $gateway->get_input_html(); |
37 | 37 | |
38 | - if ( ! empty( $html ) ) { |
|
38 | + if ( !empty( $html ) ) { |
|
39 | 39 | $inputs[ $payment_method ] = array( |
40 | 40 | 'label' => $method_name, |
41 | 41 | 'html' => $html, |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | if ( $gateway->has_error() ) { |
47 | - $pronamic_ideal_errors[] = $gateway->get_error(); |
|
47 | + $pronamic_ideal_errors[ ] = $gateway->get_error(); |
|
48 | 48 | } |
49 | 49 | |
50 | - include Plugin::$dirname . '/views/errors.php'; |
|
50 | + include Plugin::$dirname.'/views/errors.php'; |
|
51 | 51 | |
52 | 52 | ?> |
53 | 53 | <table class="form-table"> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <select id="pronamic-pay-test-payment-methods" name="pronamic_pay_test_payment_method"> |
62 | 62 | <?php |
63 | 63 | |
64 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
64 | + foreach ( $payment_methods[ 'choices' ][ 0 ][ 'options' ] as $payment_method => $method_name ) { |
|
65 | 65 | printf( |
66 | 66 | '<option value="%s" data-is-recurring="%d">%s</option>', |
67 | 67 | esc_attr( $payment_method ), |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | |
80 | 80 | <tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr( $method ); ?>"> |
81 | 81 | <th scope="row"> |
82 | - <?php echo esc_html( $input['label'] ); ?> |
|
82 | + <?php echo esc_html( $input[ 'label' ] ); ?> |
|
83 | 83 | </th> |
84 | 84 | <td> |
85 | 85 | <?php |
86 | 86 | |
87 | - echo $input['html']; // WPCS: XSS ok. |
|
87 | + echo $input[ 'html' ]; // WPCS: XSS ok. |
|
88 | 88 | |
89 | 89 | ?> |
90 | 90 | </td> |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | <?php |
297 | 297 | |
298 | 298 | if ( $is_ideal || $gateway instanceof \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Gateway ) { |
299 | - include Plugin::$dirname . '/views/ideal-test-cases.php'; |
|
299 | + include Plugin::$dirname.'/views/ideal-test-cases.php'; |
|
300 | 300 | } |
301 | 301 | } else { |
302 | 302 | printf( |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | public function get_subscription() { |
153 | 153 | $test_subscription = filter_input( INPUT_POST, 'pronamic_pay_test_subscription', FILTER_VALIDATE_BOOLEAN ); |
154 | 154 | |
155 | - if ( ! $test_subscription ) { |
|
155 | + if ( !$test_subscription ) { |
|
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | case 'count': |
178 | 178 | $count = filter_input( INPUT_POST, 'pronamic_pay_ends_on_count', FILTER_VALIDATE_INT ); |
179 | 179 | |
180 | - if ( ! empty( $count ) ) { |
|
180 | + if ( !empty( $count ) ) { |
|
181 | 181 | $times = $count; |
182 | 182 | } |
183 | 183 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | case 'date': |
186 | 186 | $end_date = filter_input( INPUT_POST, 'pronamic_pay_ends_on_date', FILTER_SANITIZE_STRING ); |
187 | 187 | |
188 | - if ( ! empty( $end_date ) ) { |
|
188 | + if ( !empty( $end_date ) ) { |
|
189 | 189 | /* translators: 1: interval, 2: interval period */ |
190 | 190 | $interval_spec = sprintf( 'P%1$s%2$s', $interval, Core_Util::to_period( $interval_period ) ); |
191 | 191 |