Add a “View all” button on WooCommerce product archives pages

I will offer you a different approach, without the need to actually edit the template files. All you need to do is add those two action hooks to your function.php file (make sure you are using a child theme):

/**
 * This will add a 'Show All' link after the pagination on the shop pages.
 * It will be hidden once it is activated.
 */
add_action( 'woocommerce_after_shop_loop', 'wpse333192_add_showall', 40 );

function wpse333192_add_showall() {

    if ( ! isset( $_GET['showall'] ) ) {
        global $wp;

        echo sprintf(
            "<a href="https://wordpress.stackexchange.com/questions/333192/%s">%s</a>",
            home_url( add_query_arg( array_merge( $_GET, [ 'showall' => 1 ] ), $wp->request ) ),
            __( 'Show All', 'text-domain' )
        );
    }

}

/**
 * This will alter the main product query if 'showall' is activated
 */
add_action( 'pre_get_posts', 'wpse333192_alter_query_showall' );

function wpse333192_alter_query_showall( $query ) {

    /**
     * Alter the query only if it is:
     * 1. The main query
     * 2. Post type is product
     * 3. $_GET['showall'] is set
     * 4. $_GET['showall'] equals 1
     */
    if ( $query->is_main_query()
         && $query->get( 'post_type' ) == 'product'
         && isset( $_GET['showall'] )
         && $_GET['showall'] == 1
    ) {
        // Load the 'first' page
        $query->set( 'paged', 1 );

        // Set post per page to unlimited
        $query->set( 'posts_per_page', - 1 );
    }

    return $query;
}