What was my mistake? (Expand all Tabs but Continue Printing Tab Selection Menu)
-
Dear Developer
I tried to copy the original woocommerce tabs code to the tabs-template.php in order to make the tabs appear again but because i can not read php code i don’t know what i am doing wrong.
It may be important to mention that i have pasted the code inside the tabs-template.php of the “wc34″ directory. Is this correct or do i need to paste it to another tabs-template.php?
What happens when i update the expand tabs plugin? Is the code going to be overwritten? Is there a way to secure the code forever?
Thank you very much for your advice
————BEGIN—-I copy this code——-
if ( ! empty( $tabs ) ) : ?><div class=”woocommerce-tabs wc-tabs-wrapper”>
<ul class=”tabs wc-tabs” role=”tablist”>
<?php foreach ( $tabs as $key => $tab ) : ?>
<li class=”<?php echo esc_attr( $key ); ?>_tab” id=”tab-title-<?php echo esc_attr( $key ); ?>” role=”tab” aria-controls=”tab-<?php echo esc_attr( $key ); ?>”>
“><?php echo apply_filters( ‘woocommerce_product_’ . $key . ‘_tab_title’, esc_html( $tab[‘title’] ), $key ); ?><?php endforeach; ?>
<?php foreach ( $tabs as $key => $tab ) : ?>
<div class=”woocommerce-Tabs-panel woocommerce-Tabs-panel–<?php echo esc_attr( $key ); ?> panel entry-content wc-tab” id=”tab-<?php echo esc_attr( $key ); ?>” role=”tabpanel” aria-labelledby=”tab-title-<?php echo esc_attr( $key ); ?>”>
<?php if ( isset( $tab[‘callback’] ) ) { call_user_func( $tab[‘callback’], $key, $tab ); } ?>
</div>
<?php endforeach; ?>
</div><?php endif; ?>
————END—-I copy this code——-————BEGIN—-I replace this code——-
if ( ! empty( $tabs ) ) : ?><div class=”woocommerce-tabs wc-tabs-wrapper”>
<?php foreach ( $tabs as $key => $tab ) : ?>
<?php if (!isset($tab[‘callback’])) continue; ?>
<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; ?>
————END—-I replace this code——-
- The topic ‘What was my mistake? (Expand all Tabs but Continue Printing Tab Selection Menu)’ is closed to new replies.