Skip to content

Commit

Permalink
Merge pull request PrestaShop#37448 from Touxten/okom3pom-patch-1
Browse files Browse the repository at this point in the history
Add missing hook on checkout account creation
  • Loading branch information
kpodemski authored Nov 26, 2024
2 parents a82ef04 + 4b33527 commit 152917e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion classes/checkout/CheckoutPersonalInformationStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ public function handleRequest(array $requestParameters = [])

if (isset($requestParameters['submitCreate'])) {
$this->registerForm->fillWith($requestParameters);
if ($this->registerForm->submit()) {
$hookResult = array_reduce(
Hook::exec('actionSubmitAccountBefore', [], null, true),
function ($carry, $item) {
return $carry && $item;
},
true
);
if ($hookResult && $this->registerForm->submit()) {
$this->setNextStepAsCurrent();
$this->setComplete(true);
} else {
Expand Down

0 comments on commit 152917e

Please sign in to comment.