diff --git a/Plugin/ContextPlugin.php b/Plugin/ContextPlugin.php index bb09d6b..f8efac7 100644 --- a/Plugin/ContextPlugin.php +++ b/Plugin/ContextPlugin.php @@ -38,8 +38,10 @@ public function aroundDispatch( // Set a default value to have common vary for all customers without any chosen retailer. $retailerId = 'default'; - if ($this->currentStore->getRetailer() - && $this->currentStore->getRetailer()->getId()) { + if ( + $this->currentStore->getRetailer() + && $this->currentStore->getRetailer()->getId() + ) { $retailerId = $this->currentStore->getRetailer()->getId(); } diff --git a/Plugin/ProductPlugin.php b/Plugin/ProductPlugin.php index 269a351..8950e5d 100644 --- a/Plugin/ProductPlugin.php +++ b/Plugin/ProductPlugin.php @@ -6,7 +6,6 @@ use Closure; use Magento\Catalog\Model\Product; -use Smile\Retailer\Api\Data\RetailerInterface; use Smile\RetailerOffer\Helper\Offer; use Smile\RetailerOffer\Helper\Settings; use Smile\StoreLocator\CustomerData\CurrentStore; @@ -16,7 +15,6 @@ */ class ProductPlugin { - public function __construct( private Offer $offerHelper, private Settings $settingsHelper, @@ -24,20 +22,6 @@ public function __construct( ) { } - /** - * Retrieve current retailer. - */ - private function getRetailer(): ?RetailerInterface - { - $retailer = null; - if ($this->currentStore->getRetailer() && $this->currentStore->getRetailer()->getId()) { - /** @var RetailerInterface $retailer */ - $retailer = $this->currentStore->getRetailer(); - } - - return $retailer; - } - /** * Return offer availability (if any) instead of the product one. *