diff --git a/CRM/Core/BAO/Translation.php b/CRM/Core/BAO/Translation.php index d66304c11a86..2b44009b3ef3 100644 --- a/CRM/Core/BAO/Translation.php +++ b/CRM/Core/BAO/Translation.php @@ -167,13 +167,7 @@ public static function self_hook_civicrm_post(\Civi\Core\Event\PostEvent $event) * @throws \CRM_Core_Exception */ public static function hook_civicrm_apiWrappers(&$wrappers, $apiRequest): void { - // Only implement for apiv4 & not in a circular way. - if ($apiRequest['entity'] === 'Translation' - || $apiRequest['entity'] === 'Entity' - || !$apiRequest instanceof AbstractAction - // Only intervene in 'get'. Code handling save type actions left out of scope. - || $apiRequest['action'] !== 'get' - ) { + if (!($apiRequest instanceof \Civi\Api4\Generic\DAOGetAction)) { return; }