I am trying to use ifconfig to hide a tab but it is not working properly below is my code please check
<?php
namespace Afg\Hidetab\Block;
class hidetab extends \Magento\Framework\View\Element\Html\Link {
/**
* @override
* @see \Magento\Framework\View\Element\Html\Link::toHtml()
* @return string
*/
public function toHtml() {return true ? parent::toHtml() : '';}
}
=========
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="hidetab" ifconfig='Afg_Hidetab/hidetab/enable' template="Afg_Hidetab::hidetab.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Lava Calculator</argument>
</arguments>
</block>
</referenceBlock>