<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var $block \Magento\Catalog\Block\Product\View */
?>

<meta property="og:type" content="product" />
<meta property="og:title"
      content="<?= $block->escapeHtmlAttr($block->stripTags($block->getProduct()->getName())) ?>" />
<meta property="og:image"
      content="<?= $block->escapeUrl($block->getImage($block->getProduct(), 'product_base_image')->getImageUrl()) ?>" />
<meta property="og:description"
      content="<?= $block->escapeHtmlAttr($block->stripTags($block->getProduct()->getShortDescription())) ?>" />
<meta property="og:url" content="<?= $block->escapeUrl($block->getProduct()->getProductUrl()) ?>" />
<?php if ($priceAmount = $block->getProduct()
          ->getPriceInfo()
          ->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE)
          ->getAmount()):?>
    <meta property="product:price:amount" content="<?= $block->escapeHtmlAttr($priceAmount) ?>"/>
    <?= $block->getChildHtml('meta.currency') ?>
<?php endif;?>
