wickywills
6/27/2018 - 2:01 PM

Add custom tabs on product single page

add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
    $tabs['test_tab'] = array(
        'title'     => __( 'New Product Tab', 'woocommerce' ),
        'priority'  => 50,
        'callback'  => 'woo_new_product_tab_content'
    );
    return $tabs;
}

function woo_datasheets_tab() {
    if( get_field('datasheetsrepeater') ):
        while( have_rows('datasheetsrepeater') ): the_row();
            echo "test";
        endwhile;
    endif;
}