Skip to content

Commit f6f7ef2

Browse files
authored
Check if OpenGraph can show price
1 parent ea79f7d commit f6f7ef2

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph/general.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<meta property="og:description"
1616
content="<?= $block->escapeHtmlAttr($block->stripTags($block->getProduct()->getShortDescription())) ?>" />
1717
<meta property="og:url" content="<?= $block->escapeUrl($block->getProduct()->getProductUrl()) ?>" />
18-
<?php if ($priceAmount = $block->getProduct()
18+
<?php if ($block->getProduct()->getCanShowPrice() !== false && $priceAmount = $block->getProduct()
1919
->getPriceInfo()
2020
->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE)
2121
->getAmount()):?>

0 commit comments

Comments
 (0)