I have created a product attribute like, display_custom_tab, if it is yes then show custom tab on product detail page, otherwise do not show tab.
can anyone please tell me how to write condition in xml or any other way to check condition.
Note : ifconfig will not work here, because product attributes are not stored in 'core_config_data'.
but tab is always showing on page. I want that if attribute is set to off, tab should hide.
This is my xml to show custom tab.
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View"
name="warrantyInfo.tab"
template="Product_CustomTab::custom_tab.phtml"
group="detailed_info">
<!--ifconfig="product/is_warranty_display"-->
<arguments>
<argument name="sort_order" xsi:type="string">40</argument>
<argument translate="true" name="title" xsi:type="string">Warranty Info</argument>
</arguments>
</block>
</referenceBlock>