Skip to content

Commit

Permalink
Merge pull request #163 from matthieu-rolland/fix-condition
Browse files Browse the repository at this point in the history
Improve condition in order validation hook
  • Loading branch information
matthieu-rolland authored Feb 28, 2024
2 parents 98361d8 + d8bd75f commit 3406505
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/Hook/HookActionValidateOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function run()
{
// Check if we are creating backoffice order, we are only launching this hook when creating backoffice order
// For FO purposes, we use displayOrderConfirmation.
if (empty($this->context->controller->controller_name) || ($this->context->controller->controller_name != 'AdminOrders' && $this->context->controller->controller_name != 'Admin')) {
if (empty($this->context->controller->controller_name)
|| !in_array($this->context->controller->controller_name, ['AdminOrders', 'Admin'])) {
return;
}

Expand Down

0 comments on commit 3406505

Please sign in to comment.