Skip to content

Commit

Permalink
Remove ajaxDie
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlavtox committed Feb 7, 2024
1 parent 4c127ba commit 4ab5578
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/admin/AdminGanalyticsAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public function init()

if (Validate::isLoadedObject($order) && (isset($this->context->employee->id) && $this->context->employee->id)) {
(new GanalyticsRepository())->markOrderAsSent((int) $orderId);
$this->ajaxDie('OK');
$this->ajaxRender('OK');
}

$this->ajaxDie('KO');
$this->ajaxRender('KO');
}
}
4 changes: 2 additions & 2 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public function initContent()
$order = new Order($orderId);

if (!Validate::isLoadedObject($order) || $order->id_customer != (int) Tools::getValue('customer')) {
$this->ajaxDie('KO');
$this->ajaxRender('KO');
}

(new GanalyticsRepository())->markOrderAsSent((int) $orderId);

$this->ajaxDie('OK');
$this->ajaxRender('OK');
}
}
1 change: 1 addition & 0 deletions tests/phpstan/phpstan-1.7.7.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ parameters:
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'
- '#Access to an undefined property Cookie\:\:\$ga_admin_order.#'
- '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#'
- '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#'

0 comments on commit 4ab5578

Please sign in to comment.