Skip to content

Commit 1baf93d

Browse files
author
Gurzhyi, Andrii
committed
MAGETWO-48190: PayPal In-Context pop up is blocked on Product page
- Visibility conditions is fixed
1 parent e8d08ed commit 1baf93d

File tree

1 file changed

+13
-10
lines changed
  • app/code/Magento/Paypal/Block/Express/InContext/Minicart

1 file changed

+13
-10
lines changed

app/code/Magento/Paypal/Block/Express/InContext/Minicart/Button.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ class Button extends Template implements ShortcutInterface
4242
private $config;
4343

4444
/**
45-
* @inheritdoc
45+
* Constructor
46+
*
47+
* @param Context $context
4648
* @param ResolverInterface $localeResolver
47-
* @param ConfigFactory $config
49+
* @param ConfigFactory $configFactory
50+
* @param array $data
4851
*/
4952
public function __construct(
5053
Context $context,
@@ -67,6 +70,14 @@ private function isInContext()
6770
return (bool)(int) $this->config->getValue('in_context');
6871
}
6972

73+
/**
74+
* @return bool
75+
*/
76+
protected function shouldRender()
77+
{
78+
return $this->isMiniCart && $this->isInContext();
79+
}
80+
7081
/**
7182
* @inheritdoc
7283
*/
@@ -125,12 +136,4 @@ public function setIsInCatalogProduct($isCatalog)
125136

126137
return $this;
127138
}
128-
129-
/**
130-
* @return bool
131-
*/
132-
protected function shouldRender()
133-
{
134-
return $this->isMiniCart;
135-
}
136139
}

0 commit comments

Comments
 (0)