@@ -1010,10 +1010,11 @@ discard block |
||
1010 | 1010 | |
1011 | 1011 | $checked = false; |
1012 | 1012 | |
1013 | - if ( isset( $wpinv_options[ $args['id'] ] ) && $wpinv_options[ $args['id'] ] == $key ) |
|
1014 | - $checked = true; |
|
1015 | - elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $wpinv_options[ $args['id'] ] ) ) |
|
1016 | - $checked = true; |
|
1013 | + if ( isset( $wpinv_options[ $args['id'] ] ) && $wpinv_options[ $args['id'] ] == $key ) { |
|
1014 | + $checked = true; |
|
1015 | + } elseif( isset( $args['std'] ) && $args['std'] == $key && ! isset( $wpinv_options[ $args['id'] ] ) ) { |
|
1016 | + $checked = true; |
|
1017 | + } |
|
1017 | 1018 | |
1018 | 1019 | echo '<input name="wpinv_settings[' . $sanitize_id . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="radio" value="' . $sanitize_key . '" ' . checked(true, $checked, false) . '/> '; |
1019 | 1020 | echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . esc_html( $option ) . '</label><br/>'; |
@@ -1030,10 +1031,11 @@ discard block |
||
1030 | 1031 | foreach ( $args['options'] as $key => $option ) : |
1031 | 1032 | $sanitize_key = wpinv_sanitize_key( $key ); |
1032 | 1033 | |
1033 | - if ( isset( $wpinv_options['gateways'][ $key ] ) ) |
|
1034 | - $enabled = '1'; |
|
1035 | - else |
|
1036 | - $enabled = null; |
|
1034 | + if ( isset( $wpinv_options['gateways'][ $key ] ) ) { |
|
1035 | + $enabled = '1'; |
|
1036 | + } else { |
|
1037 | + $enabled = null; |
|
1038 | + } |
|
1037 | 1039 | |
1038 | 1040 | echo '<input name="wpinv_settings[' . esc_attr( $args['id'] ) . '][' . $sanitize_key . ']" id="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']" type="checkbox" value="1" ' . checked('1', $enabled, false) . '/> '; |
1039 | 1041 | echo '<label for="wpinv_settings[' . $sanitize_id . '][' . $sanitize_key . ']">' . esc_html( $option['admin_label'] ) . '</label><br/>'; |
@@ -1393,7 +1395,8 @@ discard block |
||
1393 | 1395 | <td class="wpinv_tax_action"><span class="wpinv_remove_tax_rate button-secondary"><?php _e( 'Remove Rate', 'invoicing' ); ?></span></td> |
1394 | 1396 | </tr> |
1395 | 1397 | <?php endforeach; ?> |
1396 | - <?php else : ?> |
|
1398 | + <?php else { |
|
1399 | + : ?> |
|
1397 | 1400 | <tr> |
1398 | 1401 | <td class="wpinv_tax_country"> |
1399 | 1402 | <?php |
@@ -1404,7 +1407,9 @@ discard block |
||
1404 | 1407 | 'show_option_none' => false, |
1405 | 1408 | 'class' => 'wpinv-tax-country', |
1406 | 1409 | 'placeholder' => __( 'Choose a country', 'invoicing' ) |
1407 | - ) ); ?> |
|
1410 | + ) ); |
|
1411 | +} |
|
1412 | +?> |
|
1408 | 1413 | </td> |
1409 | 1414 | <td class="wpinv_tax_state"> |
1410 | 1415 | <?php echo wpinv_html_text( array( |