How to change default PDF invoice file name?
Generally, the Challan PDF Invoice for WooCommerce plugin generates PDFinvoice filename “Invoice-${order_number}.pdf” like this. Here is the way to change the default PDF invoice filename.
1 ) Install the “Code Snippets” plugin from wordpress.org
2 ) Add new snippets
3 ) Here is the filter name and basic structure you should use.
<!-- wp:paragraph -->
<p>add_filter( 'woo_invoice_file_name', 'woo_invoice_file_name_callback', 10, 3 );</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>function woo_invoice_delivery_date ($filename, $template, $order_id) {</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> return 'custom_filename';// custom name of pdf invoice</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>}</p>
<!-- /wp:paragraph -->