Skip to content

Commit

Permalink
Merge pull request #219 from FatchipRobert/MAG2-92-Unexpected-PayPal-…
Browse files Browse the repository at this point in the history
…Express-button-on-details-page

MAG2-92 - Removed PayPal Express Button from details page
  • Loading branch information
Florian Bender authored Dec 27, 2018
2 parents 3953db6 + 2d64869 commit 8e3490a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Observer/AddPaypalExpressButtons.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public function execute(Observer $observer)
/** @var \Magento\Catalog\Block\ShortcutButtons $shortcutButtons */
$shortcutButtons = $observer->getEvent()->getContainer();

if (in_array($shortcutButtons->getNameInLayout(), ['addtocart.shortcut.buttons', 'addtocart.shortcut.buttons.additional'])) {
return;
}

/** @var Shortcut $shortcut */
$shortcut = $shortcutButtons->getLayout()->createBlock(
'Payone\Core\Block\Paypal\ExpressButton',
Expand Down

0 comments on commit 8e3490a

Please sign in to comment.