Hi @omarperez999!
Thanks for reaching out. I understand that you’d like to remove the “Description” heading when a product does not have a description.
By default, WooCommerce does not display a “Description” heading above the Add to Cart button. The standard WooCommerce Description tab is displayed separately on the single product page.
Since the heading you’re seeing appears above the Add to Cart button and uses the .hidden-tab-heading CSS class, it looks like this may be coming from your theme or another customization rather than WooCommerce core.
You could potentially hide the heading with CSS using the .hidden-tab-heading class. However, we can’t confirm whether this class is also used when a product actually has a description, so simply hiding this class may also hide the heading when you want it displayed.
For that reason, the best approach would be to first determine what is generating this heading. I recommend contacting your theme’s support team and asking them how the .hidden-tab-heading element is generated and whether they can conditionally hide it when the product has no description.
They will be more familiar with the theme’s implementation and can provide the appropriate solution.
Please note that on these forums, we provide support for WooCommerce core functionality. Since this heading appears to be added or customized by the theme, the theme support team would be the best place to assist with modifying its display.
Thank you for your cooperation and understanding.
Hi @shahzeenfarooq!
So it seems that the snippet I was using to move the product description to the top, rather than have the short description, was causing the issue.
This is what I was using. If you can recommend a snippet or solution that would move the product description to the top, I’d greatly appreciate it. Thank you for your guidance!
Op
// Remove the product description tab
remove_action( ‘woocommerce_product_description_tab’, ‘woocommerce_product_description_tab’ );
remove_action( ‘woocommerce_after_product_tab_panels’, ‘woocommerce_output_product_data_tabs’, 10 );
// Add product description above the add to cart / summary area
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_excerpt’, 15 );
function woocommerce_template_product_description() {
wc_get_template( ‘single-product/tabs/description.php’ );
}
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_product_description’, 20 );