I want to hide product price from the website.
1 Answer
File Path: app/code/Solwin/Module1/etc/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\Catalog\Pricing\Render\FinalPriceBox" type="Solwin\Module1\Block\HidePrice" />
</config>
File Path: Solwin\Module1\Block\HidePrice.php
<?php
namespace Solwin\Module1\Block;
class HidePrice extends \Magento\Catalog\Pricing\Render\FinalPriceBox
{
public function wrapResult($html)
{
return '';
}
}