You should visit >Settings>Layout and turn on "Show button View invoice " .
You need PHP code to change url. This code depends on plugin which you use to generate invoices
//code for WooCommerce PDF Invoices & Packing Slips
//You should tweak depending on
// >PDF Invoice>Advanced>Settings>Document link access type
add_filter('wpo_view_invoice_url', function ($invoice_url, $order_id) {
$order = wc_get_order($order_id);
if (!$order) {
return '';
}
//$access_key = $order->get_order_key(); // mode = FULL
$access_key = wp_create_nonce( 'generate_wpo_wcpdf' ); //mode = Logged in
return admin_url("admin-ajax.php?action=generate_wpo_wcpdf&document_type=invoice&order_ids={$order_id}&access_key={$access_key}");
}, 10, 2);// code for plugin "Booster Plus"
add_filter('wpo_view_invoice_url', function ($invoice_url, $order_id) {
return add_query_arg( array('order_id' => $order_id, 'invoice_type_id' => 'invoice', 'get_invoice' => '1'), get_home_url() );
}, 10, 2);