File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 66
77/** @var $block \Magento\Catalog\Block\Product\View */
88/** @var $escaper \Magento\Framework\Escaper */
9+
10+ $ product = $ block ->getProduct ();
911?>
1012
1113<meta property="og:type" content="product" />
1214<meta property="og:title"
13- content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block -> getProduct () ->getName ())) ?> " />
15+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ product ->getName ())) ?> " />
1416<meta property="og:image"
15- content="<?= $ escaper ->escapeUrl ($ block ->getImage ($ block -> getProduct () , 'product_base_image ' )->getImageUrl ()) ?> " />
17+ content="<?= $ escaper ->escapeUrl ($ block ->getImage ($ product , 'product_base_image ' )->getImageUrl ()) ?> " />
1618<meta property="og:description"
17- content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block -> getProduct () ->getShortDescription ())) ?> " />
18- <meta property="og:url" content="<?= $ escaper ->escapeUrl ($ block -> getProduct () ->getProductUrl ()) ?> " />
19- <?php if ($ block -> getProduct ()-> getCanShowPrice () !== false && $ priceAmount = $ block -> getProduct ()
19+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ product ->getShortDescription ())) ?> " />
20+ <meta property="og:url" content="<?= $ escaper ->escapeUrl ($ product ->getProductUrl ()) ?> " />
21+ <?php if ($ product -> getCanShowPrice () !== false && $ priceAmount = $ product
2022 ->getPriceInfo ()
2123 ->getPrice (\Magento \Catalog \Pricing \Price \FinalPrice::PRICE_CODE )
2224 ->getAmount ()):?>
You can’t perform that action at this time.
0 commit comments