From 74c1ec271b5a75fef9ec837a14f4bb78af3e3bca Mon Sep 17 00:00:00 2001 From: Uryvskiy Dima Date: Thu, 26 Sep 2024 16:58:22 +0300 Subject: [PATCH] Update class-wc-retailcrm-url-validator.php Fix style --- .../url-validator/class-wc-retailcrm-url-validator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/validators/url-validator/class-wc-retailcrm-url-validator.php b/src/include/validators/url-validator/class-wc-retailcrm-url-validator.php index 7549774..2e0d25c 100644 --- a/src/include/validators/url-validator/class-wc-retailcrm-url-validator.php +++ b/src/include/validators/url-validator/class-wc-retailcrm-url-validator.php @@ -174,8 +174,10 @@ if (!class_exists('WC_Retailcrm_Url_Validator')) : if (!$content instanceof WP_ERROR && $content['response']['code'] === 200) { $domains = json_decode($content['body'], true); + return array_column($domains['domains'], 'domain'); } + return self::CRM_ALL_DOMAINS; } catch (Exception $exception) { throw new ValidatorException($this->getFileError);