diff --git a/src/product/price/PriceTypeDefinition.php b/src/product/price/PriceTypeDefinition.php index d490859a..e517ccde 100644 --- a/src/product/price/PriceTypeDefinition.php +++ b/src/product/price/PriceTypeDefinition.php @@ -48,6 +48,8 @@ class PriceTypeDefinition implements PriceTypeDefinitionInterface */ private RepresentationCollection $representationCollection; + private bool $deprecated = false; + private ?AggregateInterface $aggregate = null; private readonly PriceTypeBehaviorRegistry $behaviorRegistry; @@ -242,6 +244,13 @@ public function deprecated(): static { $this->ensureNotLocked(); + $this->deprecated = true; + return $this; } + + public function isDeprecated(): bool + { + return $this->deprecated; + } } diff --git a/src/product/price/PriceTypeDefinitionInterface.php b/src/product/price/PriceTypeDefinitionInterface.php index c46bd61d..9f06d552 100644 --- a/src/product/price/PriceTypeDefinitionInterface.php +++ b/src/product/price/PriceTypeDefinitionInterface.php @@ -76,4 +76,6 @@ public function getQuantityFormatterDefinition(): ?QuantityFormatterDefinition; * and must not appear in new tariff configurations. */ public function deprecated(): static; + + public function isDeprecated(): bool; }