Support

Account

Home Forums Add-ons Repeater Field The Word Array Displays Reply To: The Word Array Displays

  • Hi, any updates on what made the solution? Having the same problem with, Array, is written in front of the link.

    add_filter( ‘woocommerce_product_tabs’, ‘woo_new_tab’ );
    
    function woo_new_tab( $tabs ) {
    // Hide empty tabs
    if ( ! empty( $tabs ) ) {
    foreach ( $tabs as $title => $tab ) {
    if ( empty( $tab[‘content’] ) && strtolower( $tab[‘title’] ) !== ‘description’ ) {
    unset( $tabs[ $title ] );
    }
    }
    }
    $tabs[‘new2’] = array(
    ‘title’ => __( ‘Monteringsvejledninger’, ‘woocommerce’ ),
    ‘priority’ => 40,
    ‘callback’ => ‘woo_new_tab_content2’
    );
    return $tabs;
    }
    function woo_new_tab_content2() {
    // The new tab content
    echo $link = get_field(‘monteringsvejledninger’);
    if( $link ):
    $link_url = $link[‘url’];
    $link_title = $link[‘title’];
    $link_target = $link[‘target’] ? $link[‘target’] : ‘_self’;
    ?>
    ” target=”<?php echo esc_attr( $link_target ); ?>”><?php echo esc_html( $link_title ); ?>
    <?php endif;
    }