I want to remove custom tab based on if their data has no value in the admin section. Example: Suppose I create a tab for product attribute "reference" and for some product it has no value then tab will not be shown on frontend product page.
Hello @rose901yopecd7 ,
Please refer below link I hope this will work for you.
If it helps you, please accept it as solution and give kudos.
Regards.
@rose901yopecd7 You can just apply the if condition from where you are rendering the data.
Show only if it contains data like below code.
$attrVal = $product->getData('test'); //Value of your reference Attribute if(!isset($attrVal) || trim($attrVal) === ''){ //show the value }
Thanks