From 20d61d06e47fc56b9908b0241a9f0f53cfdde857 Mon Sep 17 00:00:00 2001
From: augusto fagioli <augustofagioli@gmail.com>
Date: Wed, 6 Sep 2023 19:07:33 +0200
Subject: [PATCH] apply patch at  #3350938#comment-15166041

---
 src/Plugin/ServiceDefinition/UnitIndex.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Plugin/ServiceDefinition/UnitIndex.php b/src/Plugin/ServiceDefinition/UnitIndex.php
index 8f1d874..b919369 100644
--- a/src/Plugin/ServiceDefinition/UnitIndex.php
+++ b/src/Plugin/ServiceDefinition/UnitIndex.php
@@ -123,7 +123,7 @@ class UnitIndex extends ServiceDefinitionBase implements ContainerFactoryPluginI
       $types = [];
 
       foreach (bat_unit_get_types() as $type) {
-        $type_bundle = bat_type_bundle_load($type->bundle());
+        $type_bundle = bat_unit_type_bundle_load($type->bundle());
 
         if (isset($type_bundle->default_event_value_field_ids[$event_type]) &&
             !empty($type_bundle->default_event_value_field_ids[$event_type])) {
@@ -155,7 +155,7 @@ class UnitIndex extends ServiceDefinitionBase implements ContainerFactoryPluginI
       }
 
       foreach ($childrens as $type_id => $children) {
-        $unit_type = bat_type_load($type_id);
+        $unit_type = bat_unit_type_load($type_id);
 
         $units[] = [
           'id' => $unit_type->id(),
-- 
GitLab