• candatsystems

    (@candatsystems)


    How do we control the file name of the save PDF? We are hoping to have a custom syntax for the PDF file that is saved to local hard drive. Something like this: QUOTE-YYMMDD-TIME

Viewing 1 replies (of 1 total)
  • Plugin Author David Jensen

    (@dkjensen)

    Hello

    You could use the following code snippet to do that

    add_filter( 'wc_cart_pdf_filename', function( $filename ) {
    	$filename = 'QUOTE-' . gmdate( 'ymd-His' ) . '.pdf';
    
    	return $filename;
    } );

    Might need to modify the His in the date according to the time format you would like. Formats are located here.

Viewing 1 replies (of 1 total)
  • The topic ‘Control Saved PDF File Name’ is closed to new replies.