From c20c8783cea614fbc1ae607c293beca233ce669a Mon Sep 17 00:00:00 2001
From: Dimitris Bozelos <dbozelos@gmail.com>
Date: Wed, 21 Feb 2024 02:09:55 +0000
Subject: [PATCH] Issue #3422808 Use relation type manager instead of enabler
 manager

---
 modules/product/commerceg_product.module | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/product/commerceg_product.module b/modules/product/commerceg_product.module
index 48267b6..b7ddb3f 100644
--- a/modules/product/commerceg_product.module
+++ b/modules/product/commerceg_product.module
@@ -17,29 +17,27 @@ use Drupal\Core\Entity\EntityInterface;
 /**
  * Implements hook_ENTITY_TYPE_insert().
  *
- * Clear the cached group content enabler plugin definitions when a new product
+ * Clear the cached group relation type plugin definitions when a new product
  * type is created so that it can be recognized without having to rebuild
  * caches.
  */
 function commerceg_product_commerce_product_type_insert(
   ProductTypeInterface $product_type
 ) {
-  \Drupal::service('plugin.manager.group_content_enabler')
-    ->clearCachedDefinitions();
+  \Drupal::service('group_relation_type.manager')->clearCachedDefinitions();
 }
 
 /**
  * Implements hook_ENTITY_TYPE_delete().
  *
- * Clear the cached group content enabler plugin definitions when an existing
+ * Clear the cached group relation type plugin definitions when an existing
  * product type is deleted so that it can be removed from the available plugins
  * without having to rebuild caches.
  */
 function commerceg_product_commerce_product_type_delete(
   ProductTypeInterface $product_type
 ) {
-  \Drupal::service('plugin.manager.group_content_enabler')
-    ->clearCachedDefinitions();
+  \Drupal::service('group_relation_type.manager')->clearCachedDefinitions();
 }
 
 /**
-- 
GitLab