I have used the below code its not working.
di.xml file:
< config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> < type name="Magento\Catalog\Pricing\Render\FinalPriceBox"> < plugin name="customization_finalpricebox" type="Checkout\Customization\Plugin\FinalPriceBox"/> < /type> < /config>
Plugin file code: FinalPriceBox.php
namespace Checkout\Customization\Plugin;
class FinalPriceBox
{
function aroundToHtml($subject, callable $proceed)
{
if($subject->getSaleableItem()->getHidePrice()==1){
return '';
}else{
return $proceed();
}
}
}