From 430933279f981d4201e7bed31fe906a017806990 Mon Sep 17 00:00:00 2001 From: Ivan Chaplygin Date: Mon, 20 Nov 2023 10:44:44 +0300 Subject: [PATCH] =?UTF-8?q?ref=20#85780=20=D0=9F=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=20=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8F=20=D0=B2=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D0=BE=D0=B4=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/include/class-wc-retailcrm-base.php | 19 ++++++++++++------- src/readme.txt | 5 ++++- src/retailcrm.php | 2 +- src/uninstall.php | 2 +- 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e52be4..f93e7ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2023-11-20 4.6.14 +* Fix not correct scoring product total price when product price is not number + ## 2023-10-26 4.6.13 * Fix not correct scoring product total price when product price is not number diff --git a/VERSION b/VERSION index 594401e..8af4c0d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.6.13 \ No newline at end of file +4.6.14 \ 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 376e1c2..9f34b3c 100644 --- a/src/include/class-wc-retailcrm-base.php +++ b/src/include/class-wc-retailcrm-base.php @@ -131,13 +131,7 @@ if (!class_exists('WC_Retailcrm_Base')) { add_action('retailcrm_deactivate', [$this, 'deactivate']); //Activation configured module - $clientId = get_option('retailcrm_client_id'); - $isActive = get_option('retailcrm_active_in_crm'); - - if ($this->apiClient && $clientId && !$isActive) { - WC_Retailcrm_Plugin::integration_module($this->apiClient, $clientId); - update_option('retailcrm_active_in_crm', true); - } + $this->activateModule(); } /** @@ -950,5 +944,16 @@ if (!class_exists('WC_Retailcrm_Base')) { __('I agree to receive promotional newsletters', 'retailcrm') ); } + + private function activateModule() + { + $clientId = get_option('retailcrm_client_id'); + $isActive = get_option('retailcrm_active_in_crm'); + + if ($this->apiClient && $clientId && !$isActive) { + WC_Retailcrm_Plugin::integration_module($this->apiClient, $clientId); + update_option('retailcrm_active_in_crm', true); + } + } } } diff --git a/src/readme.txt b/src/readme.txt index 0077578..7efd6da 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 7.0 Requires at least: 5.3 Tested up to: 6.2 -Stable tag: 4.6.13 +Stable tag: 4.6.14 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.6.14 = +* Fix module activation + = 4.6.13 = * Fix not correct scoring product total price when product price is not number diff --git a/src/retailcrm.php b/src/retailcrm.php index ce2e8fe..54edbbb 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.6.13 + * Version: 4.6.14 * Tested up to: 6.2 * WC requires at least: 5.4 * WC tested up to: 7.8 diff --git a/src/uninstall.php b/src/uninstall.php index 6d1018a..b1b99f8 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.6.13 + * @version 4.6.14 * * @package RetailCRM */