1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Передача доп.параметров с версиями

This commit is contained in:
anton 2024-10-09 20:20:14 +06:00
parent 618dbbe963
commit b77e9a6dc1
6 changed files with 24 additions and 5 deletions

View file

@ -1,3 +1,6 @@
## 2024-10-14 4.8.11
* Add parameters with versions of PHP, module, wordpress, woocommerce
## 2024-10-08 4.8.10
* Fixed errors in catalog formation when changing synchronization parameters (sku/externalId)

View file

@ -1 +1 @@
4.8.10
4.8.11

View file

@ -26,6 +26,7 @@ class WC_Retailcrm_Request
protected $url;
protected $defaultParameters;
protected $versionData;
/**
* Client constructor.
@ -38,6 +39,13 @@ class WC_Retailcrm_Request
{
$this->url = $url;
$this->defaultParameters = $defaultParameters;
$this->versionData = [
'php_version' => function_exists('phpversion') ? phpversion() : '',
'cms_source' => 'Woocommerce',
'module_version' => WC_Integration_Retailcrm::MODULE_VERSION,
'woocommerce_version' => WC()->version ?? '',
'cms_version' => function_exists('get_bloginfo') ? get_bloginfo('version') : ''
];
}
/**
@ -71,7 +79,11 @@ class WC_Retailcrm_Request
);
}
$parameters = array_merge($this->defaultParameters, $parameters);
if (self::METHOD_GET === $method) {
$parameters = array_merge($this->defaultParameters, $parameters, $this->versionData);
} else {
$parameters = array_merge($this->defaultParameters, $parameters);
}
$url = $this->url . $path;

View file

@ -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 =
* Add parameters with versions of PHP, module, wordpress, woocommerce
= 4.8.10 =
* Fixed errors in catalog formation when changing synchronization parameters (sku/externalId)

View file

@ -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;

View file

@ -16,7 +16,7 @@
*
* @link https://wordpress.org/plugins/woo-retailcrm/
*
* @version 4.8.10
* @version 4.8.11
*
* @package RetailCRM
*/