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

add new message for exception. correct version

This commit is contained in:
Anton 2024-09-25 20:35:48 +06:00
parent 80fc22964e
commit b724ce3e8a
4 changed files with 6 additions and 7 deletions

View file

@ -1,5 +1,5 @@
## 2024-09-25 4.8.6
* replacing the file_get_content() method with wp_remote_get()
* replacing the file_get_content() method with wp_remote_get() in url validator for download crm's domains
## 2024-09-20 4.8.5
* Project testing has been updated

View file

@ -62,6 +62,6 @@ if (!class_exists('WC_Retailcrm_Url_Constraint')) :
/**
* @var string
*/
public $getFileError = 'Unable to obtain reference values.';
public $getFileError = 'Bad Request. File not getted';
}
endif;

View file

@ -171,13 +171,12 @@ if (!class_exists('WC_Retailcrm_Url_Validator')) :
{
try {
$content = wp_remote_get($domainUrl);
if (!$content instanceof WP_ERROR && $content['response']['code'] === 200) {
$domains = json_decode($content['body'], true);
return array_column($domains['domains'], 'domain');
} else {
return self::CRM_ALL_DOMAINS;
}
return self::CRM_ALL_DOMAINS;
} catch (Exception $exception) {
throw new ValidatorException($this->getFileError);
}

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.5
Stable tag: 4.8.6
License: GPLv1 or later
License URI: http://www.gnu.org/licenses/gpl-1.0.html
@ -83,7 +83,7 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i
== Changelog ==
= 4.8.6 =
* replacing the file_get_content() method with wp_remote_get()
* replacing the file_get_content() method with wp_remote_get() in url validator for download crm's domains
= 4.8.5 =
* Project testing has been updated