change string – pdf invoice change to “receipt”
-
I would like to change invoice to “receipt” I tried it with a function but it didn’t work. Can you take a look at it?
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( ‘receipt’, ‘receipts’, count($order_ids), ‘woocommerce-pdf-invoices-packing-slips’ );
$new_filename = str_replace($invoice_string, $new_prefix, $filename);
return $new_filename;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘change string – pdf invoice change to “receipt”’ is closed to new replies.