Skip to content

Commit

Permalink
убрал комментарии, поднял версию
Browse files Browse the repository at this point in the history
  • Loading branch information
a1723 committed Jun 7, 2022
1 parent a5c7739 commit 1b11981
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog
Unreleased
----------

1.3.0 (01.06.2022)
1.4.0 (01.06.2022)
-------------------

- Корректное отображение ошибки при создании чека в таблицах с отчётами
Expand Down
8 changes: 0 additions & 8 deletions src/includes/class-komtetkassa-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ public static function save()
} else if ($type == 'integer') {
update_option($key, intval($value));
} else if ($type == 'array') {
// var_dump($_POST[$key]); die();
// update_option($key, $value);
if (isset($_POST[$key]) && array_key_exists($key, $_POST)) {
// $new_arr = array();
// foreach ($_POST[$key] as $val) {
// $new_arr[] = sanitize_text_field(
// strip_tags(stripslashes($val))
// );
// }
update_option($key, $_POST[$key]);
}
}
Expand Down
11 changes: 3 additions & 8 deletions src/includes/views/html-admin-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,8 @@
<td>
<select id="payment_systems" name="komtet_kassa_payment_systems[]" multiple>
<?php
$payment_systems = WC()->payment_gateways->get_available_payment_gateways();
foreach ($payment_systems as $payment_system_code => $payment_system_desc) :
// var_dump(selected(in_array($payment_system_code, (get_option("komtet_kassa_payment_systems"))), false)); die();
// $payment_system_code = [];
// $list[$payment_system_code] = $payment_system_desc->get_title();
// var_dump($payment_system_codes); die();
// $payment_system_code = $payment_system_code;
$payment_systems = WC()->payment_gateways->get_available_payment_gateways();
foreach ($payment_systems as $payment_system_code => $payment_system_desc) :
?>
<option value="<?php echo esc_attr($payment_system_code) ?>" <?php echo selected(in_array($payment_system_code, (get_option("komtet_kassa_payment_systems"))), true) ?>>
<?php echo esc_html($payment_system_desc->get_title()) ?>
Expand Down Expand Up @@ -247,4 +242,4 @@
</th>
</tr>
</table>
</div>
</div>
4 changes: 2 additions & 2 deletions src/komtetkassa.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description: Фискализация платежей с помощью сервиса КОМТЕТ Касса для плагина WooCommerce
Plugin URI: http://wordpress.org/plugins/komtetkassa/
Author: Komtet
Version: 1.3.0
Version: 1.4.0
Author URI: http://kassa.komtet.ru/
*/

Expand All @@ -24,7 +24,7 @@
final class KomtetKassa
{

public $version = '1.3.0';
public $version = '1.4.0';

const DEFAULT_QUEUE_NAME = 'default';
const DISCOUNT_NOT_AVAILABLE = 0;
Expand Down

0 comments on commit 1b11981

Please sign in to comment.