diff --git a/CHANGELOG.md b/CHANGELOG.md index 41541ab..844da2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2024-10-14 4.8.11 +* Added additional parameters to GET requests + ## 2024-10-08 4.8.10 * Fixed errors in catalog formation when changing synchronization parameters (sku/externalId) diff --git a/VERSION b/VERSION index bf10f80..c1b6143 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.8.10 +4.8.11 diff --git a/src/include/api/class-wc-retailcrm-request.php b/src/include/api/class-wc-retailcrm-request.php index f21e3b1..f25b067 100644 --- a/src/include/api/class-wc-retailcrm-request.php +++ b/src/include/api/class-wc-retailcrm-request.php @@ -57,9 +57,9 @@ class WC_Retailcrm_Request public function makeRequest( $path, $method, - array $parameters = array() + array $parameters = [] ) { - $allowedMethods = array(self::METHOD_GET, self::METHOD_POST); + $allowedMethods = [self::METHOD_GET, self::METHOD_POST]; if (!in_array($method, $allowedMethods, false)) { throw new \InvalidArgumentException( @@ -71,7 +71,15 @@ class WC_Retailcrm_Request ); } - $parameters = array_merge($this->defaultParameters, $parameters); + $parameters = self::METHOD_GET === $method + ? array_merge($this->defaultParameters, $parameters, [ + 'cms_source' => 'WordPress', + 'cms_version' => function_exists('get_bloginfo') ? get_bloginfo('version') : '', + 'woo_version' => WC()->version ?? '', + 'php_version' => function_exists('phpversion') ? phpversion() : '', + 'module_version' => WC_Integration_Retailcrm::MODULE_VERSION, + ]) + : $parameters = array_merge($this->defaultParameters, $parameters); $url = $this->url . $path; diff --git a/src/readme.txt b/src/readme.txt index 31d9599..96bd8d4 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.10 +Stable tag: 4.8.11 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -83,6 +83,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.8.11 = +* Added additional parameters to GET requests + = 4.8.10 = * Fixed errors in catalog formation when changing synchronization parameters (sku/externalId) diff --git a/src/retailcrm.php b/src/retailcrm.php index fb05f51..a29573c 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.10 + * Version: 4.8.11 * Tested up to: 6.5 * Requires Plugins: woocommerce * WC requires at least: 5.4 @@ -27,6 +27,7 @@ if (!class_exists( 'WC_Integration_Retailcrm')) : class WC_Integration_Retailcrm { const WOOCOMMERCE_SLUG = 'woocommerce'; const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php'; + const MODULE_VERSION = '4.8.11'; private static $instance; diff --git a/src/uninstall.php b/src/uninstall.php index 536b9ed..bbb5360 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.8.10 + * @version 4.8.11 * * @package RetailCRM */