Hi,
Well, the invoice file name is generated in 2 places in the code of the plugin.
The code you asked us about is the one used when the plugin generates the PDF invoice and adds it to the email sent to the customer.
However, there is another code:
$fileName = JText::_('INVOICE');
if($this->shipping_invoice){
$fileName = JText::_('SHIPPING_INVOICE');
}
if(count($orderIds) == 1){
if(empty( $order->order_invoice_number)) $order->order_invoice_number = $order->order_number;
if($this->shipping_invoice){
$fileName = JText::sprintf('PDF_SHIPPING_INVOICE', $order->order_invoice_number);
if($fileName == 'PDF_SHIPPING_INVOICE')
$fileName = JText::_('SHIPPING_INVOICE').'_'.$order->order_invoice_number;
}else{
$fileName = JText::sprintf('PDF_INVOICE', $order->order_invoice_number);
if($fileName == 'PDF_INVOICE')
$fileName = JText::_('INVOICE').'_'.$order->order_invoice_number;
}
}
ob_clean();
$html2pdf->Output(str_replace('/','',$fileName).'.pdf','D');which is used to generate the invoice file when you click on the buttons of the interface to retrieve the invoice file.
So, if you're testing the change by using the buttons, it's normal that you don't see any change.
You would have to also change that second piece of code in a similar manner if you want it to affect the buttons.