Add link at the end of wp_nav_menu

This is what worked for me (based on this).. hope it will be helpful for others too..

add_filter( 'wp_nav_menu_items','primary_navigation', 10, 2 );
function primary_navigation( $items, $args ) {
    if( $args->theme_location == 'primary_navigation' )  {
        if ( ! isset( $_SESSION['menu_country'] ) ) {
            $country = json_decode( file_get_contents(
               "http://freegeoip.net/json/" . esc_url( $_SERVER['REMOTE_ADDR'] )
            ) );

            $_SESSION['menu_country'] = strtolower( $country->country_code );   
        }

       $items .=  '<li class="menu-produkte"><a href="https://wordpress.stackexchange.com/" .
          esc_url( $_SESSION['menu_country'] ) .'/shop">Produkte</a></li>';
    }
    return $items;
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)