Skip to content

Commit

Permalink
Merge pull request #183 from kpodemski/fix-displaying-checkboxes
Browse files Browse the repository at this point in the history
Fix hook registration if needed
  • Loading branch information
kpodemski authored Dec 12, 2022
2 parents 7ad9d22 + 26b5df4 commit 01998cb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psgdpr.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -904,6 +905,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);
}

Expand Down
37 changes: 37 additions & 0 deletions upgrade/upgrade-1.4.3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @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;
}

0 comments on commit 01998cb

Please sign in to comment.