Remove Description tab if empty in woocommerce – codeforall

Below for line code can do magic if you want to remove the description tab from woocommerce single product page

just add this code to your tabs.php


        $product_detail = get_post(get_the_ID())->post_content;



            $description = 0;




copy and paste the above code in tabs.php file just above where it starts

Leave a Reply

Your email address will not be published. Required fields are marked *