Created
December 30, 2025 11:20
-
-
Save webdados/44439b513e96a091ca51c4ab4ed3e140 to your computer and use it in GitHub Desktop.
Change InvoiceXpress for WooCommerce document filename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'invoicexpress_woocommerce_document_filename', 'my_invoicexpress_woocommerce_document_filename', 10, 6 ); | |
| function my_invoicexpress_woocommerce_document_filename( $file_name, $order_object, $document_url, $document_type, $invoicexpress_id, $another_doc ) { | |
| $new_filename = $document_type . '-' . $order_object->get_order_number() . '.pdf'; | |
| return $new_filename; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment