Site icon Hip-Hop Website Design and Development

WooCommerce Custom Tab with ACF Repeater Field

I am using a Repeater of Advance custom field for the content of the my additional custom WooCommerce Tab. The repeater is inside a group field. I manage to display the custom fields that is outside the repeater field. Now the problem is the field inside my repeater field. The repeater field is not displaying. Here is the code I used in my functions.php

// Add a Custom Tab

add_filter( 'woocommerce_product_tabs', 'dl_custom_product_designer_tab' );
function dl_custom_product_designer_tab( $tabs ) {
    // ensure ACF is available
    if ( !function_exists( 'have_rows' ) )
        return;

    if ( get_field('designer') ) {
        $tabs[] = array(
            'title' => 'DESIGNER',
            'priority' => 50,
            'callback' => 'dl_custom_designer_tab'
        );
    }
    return $tabs;
}

function dl_custom_designer_tab() {
    $designer = get_field('designer');
        echo '<p>'.$designer['designer_image'].'</p>';
        echo '<p>'.$designer['designer_name'].'</p>';
        echo '<p>'.$designer['designer_short_description'].'</p>';
        // loop through the rows of data
        $achievements = get_field('designer_achievements');
        if( $achievements ) {
            // loop through the rows of data
            echo '<ul>';
            foreach($achievements as $achievement){
                // display a sub field value
                echo '<li>'.$achievement['achievement'].'</li>';
            }
            echo '</ul>';
        }
}