如何仅为没有说明的产品隐藏“说明”标签? tabs.php中的代码不起作用
if ( !empty( $tabs ) ) : ?> //dont work
<div style="clear:both;"></div>
<div class="woocommerce-tabs wc-tabs-wrapper">
<ul class="tabs wc-tabs">
<?php foreach ( $tabs as $key => $tab ) : ?>
<li class="<?php echo esc_attr( $key ); ?>_tab">
<a href="#tab-<?php echo esc_attr( $key ); ?>"><?php echo apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); ?></a>
</li>
<?php endforeach; ?>
</ul>
<?php foreach ( $tabs as $key => $tab ) : ?>
<div class="panel entry-content wc-tab" id="tab-<?php echo esc_attr( $key ); ?>">
<?php call_user_func( $tab['callback'], $key, $tab ); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>