[ad_1]
Try this code snippet I just wrote for you:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Capitalize the "Invoice" in the document file name
*/
add_filter( 'wpo_wcpdf_filename', function( $filename, $document_type, $order_ids, $context ) {
$new_filename = str_replace( 'invoice', 'Invoice', $filename );
return $new_filename;
}, 10, 4 );If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters
