Magento2 – How to get Product Id in FinalPriceBox Plugin

How to get Product Id in FinalPriceBox Plugin in magento 2 Using FinalPriceBox Plugin to hide price in all page how to get a product id within this plugin. /app/code/Vendor/Module/etc/di.xml <type name=”Magento\Catalog\Pricing\Render\FinalPriceBox”> <plugin name=”vendor_module_finalpricebox” type=”Vendor\Module\Plugin\FinalPriceBox”/> </type> /app/code/Vendor/Module/Plugin/FinalPriceBox.php <?php namespace Vendor\Module\Plugin; use Vendor\Module\Block\Button; use Vendor\Module\Helper\HidePrice; use Magento\Catalog\Pricing\Render\FinalPriceBox as FinalPriceBoxRenderer; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\ScopeInterface; use function strstr;…

Magento2 – How to get Product Id in FinalPriceBox Plugin

How to get Product Id in FinalPriceBox Plugin in magento 2 Using FinalPriceBox Plugin to hide price in all page how to get a product id within this plugin. /app/code/Vendor/Module/etc/di.xml <type name=”Magento\Catalog\Pricing\Render\FinalPriceBox”> <plugin name=”vendor_module_finalpricebox” type=”Vendor\Module\Plugin\FinalPriceBox”/> </type> /app/code/Vendor/Module/Plugin/FinalPriceBox.php <?php namespace Vendor\Module\Plugin; use Vendor\Module\Block\Button; use Vendor\Module\Helper\HidePrice; use Magento\Catalog\Pricing\Render\FinalPriceBox as FinalPriceBoxRenderer; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\ScopeInterface; use function strstr;…