Skip to content

Commit 98361d8

Browse files
authored
Merge pull request #161 from Hlavtox/fix-notice
Check if property exists on controller
2 parents 24ed023 + aa086eb commit 98361d8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

classes/Hook/HookActionValidateOrder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public function __construct(Ps_Googleanalytics $module, Context $context)
5353
*/
5454
public function run()
5555
{
56-
// Check if we are creating backoffice order
57-
if ($this->context->controller->controller_name != 'AdminOrders' && $this->context->controller->controller_name != 'Admin') {
56+
// Check if we are creating backoffice order, we are only launching this hook when creating backoffice order
57+
// 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')) {
5859
return;
5960
}
6061

0 commit comments

Comments
 (0)