---
title: Hide promotion types
slug: commerce-connect-15/docs/hide-promotion-types
docTags: 
createdAt: 2026-07-30T20:34:42.000Z
---

Hide promotions to prevent merchandisers and marketers from creating discounts of specific types.

Classes in this topic are available in the following namespace:

- `EPiServer.Commerce.Marketing`

To hide promotions, use the `PromotionTypeHandler` class.

- `DisablePromotions` – Disables promotion types. This setting prevents the promotions from being displayed when editing discounts.
- `EnablePromotions` – Enables promotion types.
- `DisableBuiltinPromotions` – Disables built-in promotion types. When set, only custom promotions appear in the user interface.
- `GetAllPromotionTypes` – Gets all promotion types for your site.

The following example disables the `BuyQuantityGetFreeItems` promotion:

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

The following example re-enables that promotion:

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

The following example disables 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();
    }
  }
}
```
