How do I hide woocommerce product description tab if empty?

Wondering how I can hide the long description tab on woocommerce product page when there’s no content (only a short description, for example).

Hello @jmnly,

Thanks for writing to us

I would suggest you please use the Text element to display the product’s long description where you need to use the dynamic content code to call the content.
{{dc:post:the_content}}

testproductssingle-WooCommerce-Single-Cornerstone

Now you need to set the condition on the Text element to check if there is content available for that you need to go to the Text element —>customize —>condition —>you need to select as a string and then add this dynamic content code to compare {{dc:post:the_content}} is not blank. Please have a look at the given screenshot below.

testproductssingle-WooCommerce-Single-Cornerstone (1)

Hope it helps
Thanks

Hi @prakash_s

Thank you for this info. It gives me a hint as to how to fix, however, I’m hitting an obstacle.

I’m using the woocommerce single template and would like to hide the entire column (Headline and Product Long Description) when there’s no product description. I tried adding this condition to the column but it doesn’t work.

Also, when I select the Product Long Description element, I see the message “This element does not have any inspector controls”.

Hello @jmnly,

There are no design settings options for the “Product Long Description element”.
I set the condition on the column on my localhost installation and it is working fine on my end. To help you with your concerns we need to check your settings. I would request you, please share the admin login details meanwhile I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details.

  • WordPress Login URL
  • Admin-level username and password
  • Exact Layout URL and Product URL

You can find the Secure Note button at the bottom of your posts

Thanks

Hello Jim,

Your condition should only be: {{dc:woocommerce:product_description}} IS NOT leave the field empty.

Best Regards.

1 Like

That worked. Thank you!

You are most welcome, Jim.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.