W
W
WebforSelf2020-08-04 14:41:15
WordPress
WebforSelf, 2020-08-04 14:41:15

How to properly break tabs (tabs) in woocommerce?

Woocommerce product card has tabs

do_action( 'woocommerce_after_single_product_summary' );

They are included in this action.

The task is as follows, I want to completely get rid of the tabs and make 2 boostrap blocks

<col-6>тут будет описание</div>
<col-6>Тут будут отзывы</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WebforSelf, 2020-08-04
@WebforSelf

$product_tabs = apply_filters( 'woocommerce_product_tabs', array() );

if ( ! empty( $product_tabs ) ) : ?>

  <div class="row">
    <?php foreach ( $product_tabs as $key => $product_tab ) : ?>
      <div class="col-6">
        <?php
        if ( isset( $product_tab['callback'] ) ) {
          call_user_func( $product_tab['callback'], $key, $product_tab );
        }
        ?>
      </div>
    <?php endforeach; ?>
    <?php do_action( 'woocommerce_product_after_tabs' ); ?>
  </div>

<?php endif; ?>

In the end it just did

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question