• Resolved steveinor

    (@steveinor)


    Is it possible to turn off the Product Specification tab for products that don’t have an associated specification table?

    Thanks. I think that the plugin will be really helpful for us.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dornaweb

    (@dornaweb)

    Just don’t select any table for the product you wish not to display the tab.

    Thread Starter steveinor

    (@steveinor)

    Hi Amin – The tab shows up on all products even with “none” selected for the table.

    What file has the code that makes appearance of the tab conditional?

    Plugin Author Dornaweb

    (@dornaweb)

    I’m sorry, it looks like a bug, I’ll fix it in the next update. but for now a quick fix is adding some code like this to functions.php :

    add_filter( 'woocommerce_product_tabs', 'dw_remove_specs_tab_if_no_table', 98 );
    function dw_remove_specs_tab_if_no_table( $tabs ) {
    	global $post;
    	if( ! get_post_meta( $post->ID, '_dwps_specification_table', true ) ) {
    		unset( $tabs['dw_product_specifications'] );
    	}
    	
    	return $tabs;
    }
    • This reply was modified 7 years, 10 months ago by Dornaweb.
    Thread Starter steveinor

    (@steveinor)

    Great, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product Specification Tab’ is closed to new replies.