// First, let's remove related products from their original position
 
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
 
// Second, let's add a new tab
 
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
 
function woo_new_product_tab( $tabs ) {
     
$tabs['related_products'] = array(
    'title'     => __( 'Try it with', 'woocommerce' ),
    'priority'  => 50,
    'callback'  => 'woo_new_product_tab_content'
);
    return $tabs;
}
 
// Third, let's put the related products inside
 
function woo_new_product_tab_content() {
woocommerce_related_products();
}

.related h3 {
display: none;
}

Odgovori

Vaša email adresa neće biti objavljena. Obavezna polja su označena s *

Komentiraj