Skip to content

Commit

Permalink
Merge branch 'feat/FZ-117/remove-default-store-id' into '1.x'
Browse files Browse the repository at this point in the history
feat: FZ-117 remove default store id from block class

See merge request magesuite/opengraph!16
  • Loading branch information
Piotr Matras committed Jul 30, 2024
2 parents 9df0213 + 49a496f commit db3497d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Block/Adminhtml/Preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

class Preview extends \Magento\Framework\View\Element\Template
{
const DEFAULT_STORE = 1;

/**
* @var \Magento\Framework\Registry
*/
Expand Down Expand Up @@ -60,7 +58,7 @@ public function getTags()

public function prepareUrl($value)
{
$storeId = $this->getRequest()->getParam('store') ?? self::DEFAULT_STORE;
$storeId = $this->getRequest()->getParam('store') ?? $this->storeManager->getDefaultStoreView()->getId();

$pageType = $this->getPageType();

Expand Down

0 comments on commit db3497d

Please sign in to comment.