From 59e9c69f5b714f36390e243ba5d742b05475edc6 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 19 Jul 2018 12:16:30 +0300 Subject: [PATCH] Fix delivery and payment methods, add history tests --- .travis.yml | 2 +- CHANGELOG.md | 5 + VERSION | 2 +- src/include/class-wc-retailcrm-base.php | 70 +++- src/include/class-wc-retailcrm-history.php | 275 ++++++------- src/include/class-wc-retailcrm-icml.php | 2 +- src/include/class-wc-retailcrm-orders.php | 19 +- src/include/class-wc-retailcrm-plugin.php | 13 +- src/include/functions.php | 44 +- src/readme.txt | 10 + src/retailcrm.php | 4 +- src/uninstall.php | 2 +- .../class-wc-retailcrm-test-case-helper.php | 9 +- tests/phpunit/bootstrap.php | 1 + tests/phpunit/test-wc-retailcrm-base.php | 2 +- tests/phpunit/test-wc-retailcrm-history.php | 384 ++++++++++++++++++ tests/phpunit/test-wc-retailcrm-orders.php | 5 +- 17 files changed, 638 insertions(+), 211 deletions(-) create mode 100644 tests/phpunit/test-wc-retailcrm-history.php diff --git a/.travis.yml b/.travis.yml index 0e710a8..5567970 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,6 @@ deploy: provider: script script: make on: - php: 7.1 + php: 7.2 branch: master condition: "$DEPLOY = true" diff --git a/CHANGELOG.md b/CHANGELOG.md index c38a0c6..a87dc06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2018-07-19 v3.2.0 +* Улучшен метод выробки данных о доставках и оплатах в настройках плагина +* Исправлены ошибки при обработке истории изменений +* Добавлены тесты для обработки истории изменений + ## 2018-06-19 v3.1.1 * Исправлен код отправки данных в UA * Добавлены новые фильтры, добавлена передача новых параметров в существущие diff --git a/VERSION b/VERSION index 50e47c8..a4f52a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.1 \ No newline at end of file +3.2.0 \ No newline at end of file diff --git a/src/include/class-wc-retailcrm-base.php b/src/include/class-wc-retailcrm-base.php index 1c9365a..826f258 100644 --- a/src/include/class-wc-retailcrm-base.php +++ b/src/include/class-wc-retailcrm-base.php @@ -198,7 +198,8 @@ if (!class_exists('WC_Retailcrm_Base')) { /** * Upload archive customers and order to retailCRM */ - public function upload_to_crm() { + public function upload_to_crm() + { if (!class_exists('WC_Retailcrm_Orders')) { include_once(self::checkCustomFile('orders')); } @@ -219,7 +220,8 @@ if (!class_exists('WC_Retailcrm_Base')) { update_option(self::$option_key, $options); } - public function ajax_upload() { + public function ajax_upload() + { $ajax_url = admin_url('admin-ajax.php'); ?>