From 82824fd87ab22bfa6ccd6718275528d7415e94b0 Mon Sep 17 00:00:00 2001 From: Mediacom87 Date: Mon, 10 Apr 2023 22:53:41 +0200 Subject: [PATCH] PrestaShop 8 Compatibility --- printful.php | 2 +- src/services/VersionValidatorService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/printful.php b/printful.php index 22b327e..1a43ea2 100644 --- a/printful.php +++ b/printful.php @@ -74,7 +74,7 @@ public function __construct() { $this->name = 'printful'; $this->tab = 'others'; - $this->version = '1.0.3'; + $this->version = '1.0.4'; $this->author = 'Printful'; $this->need_instance = 1; diff --git a/src/services/VersionValidatorService.php b/src/services/VersionValidatorService.php index eaab565..217fc06 100644 --- a/src/services/VersionValidatorService.php +++ b/src/services/VersionValidatorService.php @@ -58,7 +58,7 @@ public function getActualVersionData() )); $releaseJsonData = Tools::file_get_contents(self::PLUGIN_RELEASE_DATA_URL, false, $context); - $releaseData = Tools::jsonDecode($releaseJsonData, true); + $releaseData = json_decode($releaseJsonData, true); // new result with defaults $currentCheckData = new PrintfulPluginVersionCheckData(); @@ -83,7 +83,7 @@ public function getActualVersionData() */ protected function storeVersionCheckData(PrintfulPluginVersionCheckData $data) { - $jsonData = Tools::jsonEncode($data->toArray()); + $jsonData = json_encode($data->toArray()); Configuration::set(Printful::CONFIG_PRINTFUL_VERSION_CHECK_DATA, $jsonData); }