diff --git a/README.md b/README.md index acfb312..00e51f1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This repository contains the PrestaShop wallee payment module that enables the s ## Documentation -* [English](https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.2.34/docs/en/documentation.html) +* [English](https://plugin-documentation.wallee.com/wallee-payment/prestashop-1.6/1.2.36/docs/en/documentation.html) ## Support @@ -23,7 +23,7 @@ Support queries can be issued on the [wallee support site](https://app-wallee.co ## License -Please see the [license file](https://github.com/wallee-payment/prestashop-1.6/blob/1.2.34/LICENSE) for more information. +Please see the [license file](https://github.com/wallee-payment/prestashop-1.6/blob/1.2.36/LICENSE) for more information. ## Other PrestaShop Versions diff --git a/docs/en/documentation.html b/docs/en/documentation.html index b1d2695..9f218c9 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -22,7 +22,7 @@
Download the module.
+Download the module.
Login to the backend of your PrestsShop store.
diff --git a/inc/Exception/Incompleteconfig.php b/inc/Exception/Incompleteconfig.php index ac8058d..a4df093 100644 --- a/inc/Exception/Incompleteconfig.php +++ b/inc/Exception/Incompleteconfig.php @@ -24,7 +24,7 @@ class WalleeExceptionIncompleteconfig extends Exception * @param Throwable|null $previous * The previously thrown exception. */ - public function __construct($message = "The configuration is not complete", int $code = 0, ?Throwable $previous = null) { + public function __construct($message = "The configuration is not complete", $code = 0, Throwable $previous = null) { parent::__construct($message, $code, $previous); } } diff --git a/inc/Helper.php b/inc/Helper.php index 4cc9d7f..9d76a36 100644 --- a/inc/Helper.php +++ b/inc/Helper.php @@ -11,9 +11,9 @@ class WalleeHelper { - public const SHOP_SYSTEM = 'x-meta-shop-system'; - public const SHOP_SYSTEM_VERSION = 'x-meta-shop-system-version'; - public const SHOP_SYSTEM_AND_VERSION = 'x-meta-shop-system-and-version'; + protected static $shop_system = 'x-meta-shop-system'; + protected static $shop_system_version = 'x-meta-shop-system-version'; + protected static $shop_system_and_version = 'x-meta-shop-system-and-version'; private static $apiClient; @@ -675,11 +675,18 @@ public static function getMaxExecutionTime() protected static function getDefaultHeaderData() { $shop_version = _PS_VERSION_; - [$major_version, $minor_version, $_] = explode('.', $shop_version, 3); + $version_array = explode('.', $shop_version, 3); + if (count($version_array) < 2) { + // The format in _PS_VERSION_ has changed and it's unknown to us. + return []; + + } + $major_version = current($version_array); + $minor_version = next($version_array); return [ - self::SHOP_SYSTEM => 'prestashop', - self::SHOP_SYSTEM_VERSION => $shop_version, - self::SHOP_SYSTEM_AND_VERSION => 'prestashop-' . $major_version . '.' . $minor_version, + self::$shop_system => 'prestashop', + self::$shop_system_version => $shop_version, + self::$shop_system_and_version => 'prestashop-' . $major_version . '.' . $minor_version, ]; } } diff --git a/views/templates/admin/admin_help_buttons.tpl b/views/templates/admin/admin_help_buttons.tpl index 0660fa2..d3f7118 100644 --- a/views/templates/admin/admin_help_buttons.tpl +++ b/views/templates/admin/admin_help_buttons.tpl @@ -10,5 +10,5 @@{l s='This module requires an %s account.' sprintf='wallee' mod='wallee'}
-{l s='Sign Up' mod='wallee'} {l s='Documentation' mod='wallee'}
+{l s='Sign Up' mod='wallee'} {l s='Documentation' mod='wallee'}