Skip to content

Commit 3406505

Browse files
Merge pull request #163 from matthieu-rolland/fix-condition
Improve condition in order validation hook
2 parents 98361d8 + d8bd75f commit 3406505

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

classes/Hook/HookActionValidateOrder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public function run()
5555
{
5656
// Check if we are creating backoffice order, we are only launching this hook when creating backoffice order
5757
// For FO purposes, we use displayOrderConfirmation.
58-
if (empty($this->context->controller->controller_name) || ($this->context->controller->controller_name != 'AdminOrders' && $this->context->controller->controller_name != 'Admin')) {
58+
if (empty($this->context->controller->controller_name)
59+
|| !in_array($this->context->controller->controller_name, ['AdminOrders', 'Admin'])) {
5960
return;
6061
}
6162

0 commit comments

Comments
 (0)