Override url opened by button “View Invoice”
You should visit “Settings” – “Interface” 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.
1 2 3 4 |
// 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); |