From 2f374021980148c0757e48cfb8d9dec9d7f2789a Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Fri, 9 Dec 2022 11:46:32 +0100 Subject: [PATCH 1/3] Fix hook registration if needed cs fix --- upgrade/upgrade-1.4.3.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 upgrade/upgrade-1.4.3.php diff --git a/upgrade/upgrade-1.4.3.php b/upgrade/upgrade-1.4.3.php new file mode 100644 index 00000000..6d17fd80 --- /dev/null +++ b/upgrade/upgrade-1.4.3.php @@ -0,0 +1,37 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) + */ +if (!defined('_PS_VERSION_')) { + exit; +} + +/** + * @param Psgdpr $module + * + * @return bool + */ +function upgrade_module_1_4_3($module) +{ + if (!$module->isRegisteredInHook('displayGDPRConsent')) { + return $module->registerHook('displayGDPRConsent'); + } + + return true; +} From 69d84aea91d186c9b4318effcd6ad2927e113b93 Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Fri, 9 Dec 2022 12:04:50 +0100 Subject: [PATCH 2/3] fix PHPStan --- psgdpr.php | 1 + 1 file changed, 1 insertion(+) diff --git a/psgdpr.php b/psgdpr.php index 09b85c54..f6828693 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -904,6 +904,7 @@ public function getCustomerDataFromPrestashop(Customer $customer) // get referrers if (version_compare(_PS_VERSION_, '8.0.0', '<')) { + // @phpstan-ignore-next-line $data['referrer'] = Referrer::getReferrers($customer->id); } From 26b5df4b148084723a814f34bb97a99f18c4a0cc Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Mon, 12 Dec 2022 14:36:34 +0100 Subject: [PATCH 3/3] fix consent on the registration page --- psgdpr.php | 1 + 1 file changed, 1 insertion(+) diff --git a/psgdpr.php b/psgdpr.php index f6828693..b98745a4 100755 --- a/psgdpr.php +++ b/psgdpr.php @@ -566,6 +566,7 @@ public function hookAdditionalCustomerFormFields() $label = Configuration::get('PSGDPR_CUSTOMER_FORM', $id_lang); break; case 'authentication': + case 'registration': case 'order': case 'order-confirmation': $active = Configuration::get('PSGDPR_CREATION_FORM_SWITCH');