---
title: Hide promotion types
slug: commerce-connect-14/docs/hiding-promotion-types
docTags: 
createdAt: 2026-07-23T10:25:34.040Z
---

Hiding promotions can be useful in scenarios where you want to prevent merchandisers and marketers from creating new discounts of specific types.

The components mentioned here are available in the `EPiServer.Commerce.Marketing` namespace.

To hide promotions, use the `PromotionTypeHandler` class.

- `DisablePromotions` – Disable promotion types. This setting will prevent these promotions to display when editing discounts.
- `EnablePromotions` – Enable promotion types.
- `DisableBuiltinPromotions` – Disable built-in promotion types. If this is set, only custom promotions appear in the user interface.
- `GetAllPromotionTypes` – Get your site's promotion types.

Disable the `BuyQuantityGetFreeItems` promotion.

```csharp
var promotionTypeHandler = ServiceLocator.Current.GetInstance<PromotionTypeHandler>();
    promotionTypeHandler.DisablePromotions(new[] { typeof(BuyQuantityGetFreeItems) });
```

Re-enable that promotion.

```csharp
promotionTypeHandler.EnablePromotions(new[] { typeof(BuyQuantityGetFreeItems) });
```

Disable all built-in promotion types when a site is initialized.

```csharp
namespace EPiServer.Commerce.Sample.Business.Initialization
      {
        [ModuleDependency(typeof(EPiServer.Commerce.Initialization.InitializationModule))]
        public class InitializationModule : IConfigurableModule
          {
            public void Initialize(InitializationEngine context)
              {
                DisablePromotionTypes(context);
              }
     
            public void Uninitialize(InitializationEngine context)
              {
              }
    
            public void ConfigureContainer(ServiceConfigurationContext context)
              {
              }        
    
            private void DisablePromotionTypes(InitializationEngine context)
              {
                var promotionTypeHandler = context.Locate.Advanced.GetInstance<PromotionTypeHandler>();
    
                // To disable all built-in promotion types
                promotionTypeHandler.DisableBuiltinPromotions();
              }
          }
      }
```
