Filter: wr_pdf_template_modify_response

Allows external plugins to make last modifications on the generate response. 

The response is an array which contains the filename and the generate pdf as string. 

 

 

 

Example: Change Filename programatically

add_filter( "wr_pdf_template_modify_response", array( $this, "custom_filename" ), 10, 3 );

public function custom_filename( $response, $payload, GetPdfObject ) {
	if ( $payload["option"]["identifier"] == "identifier" ) {
		$response["filename"] = "custom.pdf"
	}

	return $filename;
}