Home > widget-integration > TierDiscountService > performShopValidation

TierDiscountService.performShopValidation() method

Extension point for shop-specific validation logic. Override to add custom validation rules.

Signature:

protected performShopValidation(widgetId: string): boolean;

Parameters

Parameter

Type

Description

widgetId

string

Widget to validate

Returns:

boolean

Whether widget passes shop validation

Example

protected performShopValidation(widgetId: string): boolean {
  const config = this.getShopConfig();
  return config.enabledWidgets.includes(widgetId);
}