@@ -132,14 +132,14 @@ |
||
| 132 | 132 | $first_name = filter_input( INPUT_POST, 'pronamic_pay_first_name', FILTER_SANITIZE_STRING ); |
| 133 | 133 | |
| 134 | 134 | if ( empty( $first_name ) ) { |
| 135 | - $pronamic_pay_errors['first_name'] = __( 'Please enter your first name', 'pronamic_ideal' ); |
|
| 135 | + $pronamic_pay_errors[ 'first_name' ] = __( 'Please enter your first name', 'pronamic_ideal' ); |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | // E-mail. |
| 139 | 139 | $email = filter_input( INPUT_POST, 'pronamic_pay_email', FILTER_VALIDATE_EMAIL ); |
| 140 | 140 | |
| 141 | 141 | if ( empty( $email ) ) { |
| 142 | - $pronamic_pay_errors['email'] = __( 'Please enter a valid email address', 'pronamic_ideal' ); |
|
| 142 | + $pronamic_pay_errors[ 'email' ] = __( 'Please enter a valid email address', 'pronamic_ideal' ); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return empty( $pronamic_pay_errors ); |
@@ -307,15 +307,15 @@ |
||
| 307 | 307 | $data = filter_input_array( INPUT_POST, $definition ); |
| 308 | 308 | |
| 309 | 309 | // Convert amount choices to cents. |
| 310 | - if ( isset( $data['_pronamic_payment_form_amount_choices'] ) ) { |
|
| 311 | - foreach ( $data['_pronamic_payment_form_amount_choices'] as $i => $amount ) { |
|
| 310 | + if ( isset( $data[ '_pronamic_payment_form_amount_choices' ] ) ) { |
|
| 311 | + foreach ( $data[ '_pronamic_payment_form_amount_choices' ] as $i => $amount ) { |
|
| 312 | 312 | $amount = \Pronamic\WordPress\Pay\Core\Util::string_to_amount( $amount ); |
| 313 | 313 | |
| 314 | - $data['_pronamic_payment_form_amount_choices'][ $i ] = \Pronamic\WordPress\Pay\Core\Util::amount_to_cents( $amount ); |
|
| 314 | + $data[ '_pronamic_payment_form_amount_choices' ][ $i ] = \Pronamic\WordPress\Pay\Core\Util::amount_to_cents( $amount ); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | // Remove empty choices. |
| 318 | - $data['_pronamic_payment_form_amount_choices'] = array_filter( $data['_pronamic_payment_form_amount_choices'] ); |
|
| 318 | + $data[ '_pronamic_payment_form_amount_choices' ] = array_filter( $data[ '_pronamic_payment_form_amount_choices' ] ); |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | // Update post meta data. |