From 618dbbe963038d70c9a0c0baf5a499bc109cc92b Mon Sep 17 00:00:00 2001 From: ellynoize <111681973+ellynoize@users.noreply.github.com> Date: Wed, 9 Oct 2024 12:33:09 +0600 Subject: [PATCH] Fix Js-errors (#350) --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/assets/js/retailcrm-module-settings.js | 26 ++++++++++++---------- src/readme.txt | 6 ++++- src/retailcrm.php | 2 +- src/uninstall.php | 2 +- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7083fbb..41541ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2024-10-08 4.8.10 +* Fixed errors in catalog formation when changing synchronization parameters (sku/externalId) + ## 2024-09-30 4.8.9 * Improvement of customer registration form in loyalty program diff --git a/VERSION b/VERSION index 34d6b60..bf10f80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.8.9 +4.8.10 diff --git a/src/assets/js/retailcrm-module-settings.js b/src/assets/js/retailcrm-module-settings.js index 4de3649..357eb7f 100644 --- a/src/assets/js/retailcrm-module-settings.js +++ b/src/assets/js/retailcrm-module-settings.js @@ -1,15 +1,17 @@ jQuery(function () { - document.querySelector('#woocommerce_integration-retailcrm_bind_by_sku').onchange = function() { - let useXmlId = this.checked ? 'yes' : 'no'; + if (document.querySelector('#woocommerce_integration-retailcrm_bind_by_sku')) { + document.querySelector('#woocommerce_integration-retailcrm_bind_by_sku').onchange = function() { + let useXmlId = this.checked ? 'yes' : 'no'; - document.querySelector('.submit').onclick = function() { - jQuery.ajax({ - url: AdminUrl.url + '/admin-ajax.php?action=generate_icml', - method: 'POST', - timeout: 0, - data: {useXmlId: useXmlId}, - dataType: 'json' - }) - } - }; + document.querySelector('.submit').onmousedown = function() { + jQuery.ajax({ + url: AdminUrl.url + '/admin-ajax.php?action=generate_icml', + method: 'POST', + timeout: 0, + data: {useXmlId: useXmlId}, + dataType: 'json' + }) + } + }; + } }) diff --git a/src/readme.txt b/src/readme.txt index 8936352..31d9599 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 7.1 Requires at least: 5.3 Tested up to: 6.5 -Stable tag: 4.8.9 +Stable tag: 4.8.10 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -82,6 +82,10 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == + += 4.8.10 = +* Fixed errors in catalog formation when changing synchronization parameters (sku/externalId) + = 4.8.9 = * Improvement of customer registration form in loyalty program diff --git a/src/retailcrm.php b/src/retailcrm.php index 1bce89f..fb05f51 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.8.9 + * Version: 4.8.10 * Tested up to: 6.5 * Requires Plugins: woocommerce * WC requires at least: 5.4 diff --git a/src/uninstall.php b/src/uninstall.php index 8275ed6..536b9ed 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.8.9 + * @version 4.8.10 * * @package RetailCRM */