File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Catalog/Model/Product/Type Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -634,7 +634,7 @@ public function calculateSpecialPrice(
634634 ) {
635635 if ($ specialPrice !== null && $ specialPrice != false ) {
636636
637- $ specialPriceTo = $ this ->specialPriceService ->execute ($ specialPriceTo );
637+ $ specialPriceTo = $ this ->getSpecialPriceService () ->execute ($ specialPriceTo );
638638
639639 if ($ this ->_localeDate ->isScopeDateInInterval ($ store , $ specialPriceFrom , $ specialPriceTo )) {
640640 $ specialPrice = $ finalPrice * ($ specialPrice / 100 );
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ class Price implements ResetAfterRequestInterface
9292 /**
9393 * @var SpecialPriceService|null
9494 */
95- protected ?SpecialPriceService $ specialPriceService ;
95+ private ?SpecialPriceService $ specialPriceService ;
9696
9797 /**
9898 * Constructor
@@ -138,6 +138,14 @@ public function __construct(
138138 ->get (SpecialPriceService::class);
139139 }
140140
141+ /**
142+ * @return SpecialPriceService|null
143+ */
144+ protected function getSpecialPriceService (): ?SpecialPriceService
145+ {
146+ return $ this ->specialPriceService ;
147+ }
148+
141149 /**
142150 * Default action to get price of product
143151 *
You can’t perform that action at this time.
0 commit comments