Woocommerce replace add to cart button with custom link in product archive page

Add below code in your theme function.php

/* Replace add to cart button with login */
add_action('woocommerce_before_shop_loop_item','remove_loop_add_to_cart_button'); 
function remove_loop_add_to_cart_button(){
    global $product; // Current product
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); 
}

/*STEP 2 -ADD NEW BUTTON THAT LINKS TO PRODUCT PAGE FOR EACH PRODUCT
*/
add_action('woocommerce_after_shop_loop_item','replace_add_to_cart_with_login'); 
function replace_add_to_cart_with_login() {
    global $product;
    $link = get_permalink(get_page_by_path('my-account')); 
    echo '<a class="button" href="' . esc_attr($link) . '">Login</a>';
}