From 2b977d68317c546ad7cbc7d89a91038d64fdc94a Mon Sep 17 00:00:00 2001 From: Jonathan Renard <1273438+fox-john@users.noreply.github.com> Date: Thu, 5 Dec 2024 14:05:26 +0100 Subject: [PATCH] chore: disable problematic hook (#399) --- ps_eventbus.php | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/ps_eventbus.php b/ps_eventbus.php index 4f896071..bbbcc490 100644 --- a/ps_eventbus.php +++ b/ps_eventbus.php @@ -1644,34 +1644,34 @@ public function hookActionObjectEmployeeUpdateAfter() */ public function hookActionDispatcherBefore($parameters) { - /** @var SynchronizationService $synchronizationService * */ - $synchronizationService = $this->getService('PrestaShop\Module\PsEventbus\Service\SynchronizationService'); - - try { - /* - * Class "ActionDispatcherLegacyHooksSubscriber" as implement in 1.7.3.0: - * https://github.com/PrestaShop/PrestaShop/commit/a4ae4544cc62c818aba8b3d9254308f538b7acdc - */ - if ($parameters['controller_type'] != 2) { - return; - } - - if (array_key_exists('route', $parameters)) { - $route = $parameters['route']; - - // when translation is edited or reset, add to incremental sync - if ($route == 'api_translation_value_edit' || $route == 'api_translation_value_reset') { - $synchronizationService->insertIncrementalSyncObject( - 0, - Config::COLLECTION_TRANSLATIONS, - date(DATE_ATOM), - $this->shopId - ); - } - } - } catch (Exception $e) { - return; - } + // /** @var SynchronizationService $synchronizationService * */ + // $synchronizationService = $this->getService('PrestaShop\Module\PsEventbus\Service\SynchronizationService'); + // + // try { + // /* + // * Class "ActionDispatcherLegacyHooksSubscriber" as implement in 1.7.3.0: + // * https://github.com/PrestaShop/PrestaShop/commit/a4ae4544cc62c818aba8b3d9254308f538b7acdc + // */ + // if ($parameters['controller_type'] != 2) { + // return; + // } + // + // if (array_key_exists('route', $parameters)) { + // $route = $parameters['route']; + // + // // when translation is edited or reset, add to incremental sync + // if ($route == 'api_translation_value_edit' || $route == 'api_translation_value_reset') { + // $synchronizationService->insertIncrementalSyncObject( + // 0, + // Config::COLLECTION_TRANSLATIONS, + // date(DATE_ATOM), + // $this->shopId + // ); + // } + // } + // } catch (Exception $e) { + // return; + // } } /**