fixed PS version compability
This commit is contained in:
@@ -68,13 +68,13 @@ class Hutko extends PaymentModule
|
|||||||
// We only need to check if the *required* hook for this version was successfully registered.
|
// We only need to check if the *required* hook for this version was successfully registered.
|
||||||
$conditionalHookSuccess = true; // Assume success until we try to register one and it fails
|
$conditionalHookSuccess = true; // Assume success until we try to register one and it fails
|
||||||
|
|
||||||
// Check if PrestaShop version is 1.7.x (>= 1.7 and < 8.0)
|
// Check if PrestaShop version is 1.7.x (>= 1.7 and < 1.7.7)
|
||||||
if (version_compare(_PS_VERSION_, '1.7', '>=') && version_compare(_PS_VERSION_, '8.0', '<')) {
|
if (version_compare(_PS_VERSION_, '1.7', '>=') && version_compare(_PS_VERSION_, '1.7.7', '<')) {
|
||||||
// Register the 1.7 hook
|
// Register the 1.7 hook
|
||||||
$conditionalHookSuccess = $this->registerHook('displayAdminOrderContentOrder');
|
$conditionalHookSuccess = $this->registerHook('displayAdminOrderContentOrder');
|
||||||
}
|
}
|
||||||
// Check if PrestaShop version is 8.x or 9.x (>= 8.0 and < 10.0)
|
// Check if PrestaShop version is 1.7.7 or 9.x (>= 1.7.7 and < 10.0)
|
||||||
elseif (version_compare(_PS_VERSION_, '8.0', '>=') && version_compare(_PS_VERSION_, '10.0', '<')) {
|
elseif (version_compare(_PS_VERSION_, '1.7.7', '>=') && version_compare(_PS_VERSION_, '10.0', '<')) {
|
||||||
// Register the 8.x/9.x hook
|
// Register the 8.x/9.x hook
|
||||||
$conditionalHookSuccess = $this->registerHook('displayAdminOrderTabContent');
|
$conditionalHookSuccess = $this->registerHook('displayAdminOrderTabContent');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user