How to change the PDF filename in Free version?
-
Hello there,
I need to change the PDF filename in the free version. I already found this code:
add_filter( 'wpo_wcpdf_filename', 'wpo_wcpdf_custom_filename', 10, 4 ); function wpo_wcpdf_custom_filename( $filename, $template_type, $order_ids, $context ) { $invoice_string = _n( 'invoice', 'invoices', count($order_ids), 'woocommerce-pdf-invoices-packing-slips' ); $new_prefix = _n( 'booking', 'bookings', count($order_ids), 'woocommerce-pdf-invoices-packing-slips' ); $new_filename = str_replace($invoice_string, $new_prefix, $filename); return $new_filename; }
In my italian version of the plugin I get “fattura” instead of “invoice”. This is the proper translation but I would need “certificato”. What should I change of that code in order to make it working?
Thank you in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to change the PDF filename in Free version?’ is closed to new replies.