From 6a77e02e896694355dea904c71c1d14e392ad76b Mon Sep 17 00:00:00 2001 From: Dima Uryvskiy Date: Wed, 4 Aug 2021 15:41:48 +0300 Subject: [PATCH] Fix bug in uploader --- CHANGELOG.md | 4 ++++ VERSION | 2 +- src/assets/js/retailcrm-export.js | 8 ++++---- src/include/class-wc-retailcrm-base.php | 14 +++++++------- src/readme.txt | 6 +++++- src/retailcrm.php | 2 +- src/uninstall.php | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29c4df0..1527b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2021-08-04 4.3.7 +* Исправили ошибку с неправильной выгрузкой архивных клиентов. +* Удалил опцию "Роли клиентов" с настроек модуля. + ## 2021-07-27 4.3.6 * Обновили отображение настроек модуля * Исправлен баг с добавлением вариативных товаров в каталог как обычных diff --git a/VERSION b/VERSION index 6401288..4b8dea4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.3.6 \ No newline at end of file +4.3.7 \ No newline at end of file diff --git a/src/assets/js/retailcrm-export.js b/src/assets/js/retailcrm-export.js index 28f9ba3..15e2156 100644 --- a/src/assets/js/retailcrm-export.js +++ b/src/assets/js/retailcrm-export.js @@ -30,8 +30,8 @@ jQuery(function () { dataType: "json" }) .done(function (response) { - _this.ordersCount = response.count_orders; - _this.customersCount = response.count_users; + _this.ordersCount = Number(response.count_orders); + _this.customersCount = Number(response.count_users); jQuery(_this.submitButton).removeClass('retail-hidden'); _this.displayCountUploadData(); @@ -71,12 +71,12 @@ jQuery(function () { let data = {}; if (this.customersStep * this.customersStepSize < this.customersCount) { - data.RETAILCRM_EXPORT_CUSTOMERS_STEP = this.customersStep; + data.Step = this.customersStep; data.Entity = 'customer'; this.customersStep++; } else { if (this.ordersStep * this.ordersStepSize < this.ordersCount) { - data.RETAILCRM_EXPORT_ORDERS_STEP = this.ordersStep; + data.Step = this.ordersStep; data.Entity = 'order'; this.ordersStep++; } else { diff --git a/src/include/class-wc-retailcrm-base.php b/src/include/class-wc-retailcrm-base.php index 294f8e9..ce00542 100644 --- a/src/include/class-wc-retailcrm-base.php +++ b/src/include/class-wc-retailcrm-base.php @@ -258,7 +258,7 @@ if (!class_exists('WC_Retailcrm_Base')) { */ public function upload_to_crm() { - $page = filter_input(INPUT_POST, 'RETAILCRM_EXPORT_ORDERS_STEP'); + $page = filter_input(INPUT_POST, 'Step'); $entity = filter_input(INPUT_POST, 'Entity'); if ($entity === 'customer') { @@ -472,10 +472,10 @@ if (!class_exists('WC_Retailcrm_Base')) { { $path = plugins_url() . '/woo-retailcrm/assets/js/'; - wp_register_script('retailcrm-export', $path . 'retailcrm-export.js'); + wp_register_script('retailcrm-export', $path . 'retailcrm-export.js', false, '0.1'); wp_enqueue_script('retailcrm-export', $path . 'retailcrm-export.js', '', '', true); - wp_register_script('retailcrm-cron-info', $path . 'retailcrm-cron-info.js'); + wp_register_script('retailcrm-cron-info', $path . 'retailcrm-cron-info.js', false, '0.1'); wp_enqueue_script('retailcrm-cron-info', $path . 'retailcrm-export.js', '', '', true); } @@ -564,10 +564,10 @@ if (!class_exists('WC_Retailcrm_Base')) { /** - * Get retailcrm api client - * - * @return bool|WC_Retailcrm_Proxy|\WC_Retailcrm_Client_V4|\WC_Retailcrm_Client_V5 - */ + * Get retailcrm api client + * + * @return bool|WC_Retailcrm_Proxy|\WC_Retailcrm_Client_V4|\WC_Retailcrm_Client_V5 + */ public function getApiClient() { if ($this->get_option('api_url') && $this->get_option('api_key')) { diff --git a/src/readme.txt b/src/readme.txt index 4c83215..f6bc8c3 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 5.3 Requires at least: 5.3 Tested up to: 5.8 -Stable tag: 4.3.6 +Stable tag: 4.3.7 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -83,6 +83,10 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.3.7 = +* Исправили ошибку с неправильной выгрузкой архивных клиентов. +* Удалил опцию "Роли клиентов" с настроек модуля. + = 4.3.6 = * Обновили отображение настроек модуля * Исправлен баг с добавлением вариативных товаров в каталог как обычных diff --git a/src/retailcrm.php b/src/retailcrm.php index ee04b0a..4d0c085 100644 --- a/src/retailcrm.php +++ b/src/retailcrm.php @@ -5,7 +5,7 @@ * Description: Integration plugin for WooCommerce & Simla.com * Author: RetailDriver LLC * Author URI: http://retailcrm.pro/ - * Version: 4.3.6 + * Version: 4.3.7 * Tested up to: 5.8 * WC requires at least: 3.0 * WC tested up to: 5.4 diff --git a/src/uninstall.php b/src/uninstall.php index a03ce90..4054b83 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.3.6 + * @version 4.3.7 * * @package RetailCRM */