I saw that you can add a date to the filename of the Pro reports’ PDF.
The solution mentioned is to use this snippet:
add_filter( ‘mainwp_pro_reports_pdf_filename’, ‘mycustom_mainwp_pro_reports_pdf_filename’, 10, 3 );
if ( !function_exists( ‘mycustom_mainwp_pro_reports_pdf_filename’ ) ) {
function mycustom_mainwp_pro_reports_pdf_filename( $filename, $report, $site_id ) {
$date = date(“Y/m/d”);
return ‘pro-report-’ . $date . ‘.pdf’;
}
}
The easiest way to add filters such as these is by using our Custom Dashboard extension under the PHP section.
You can always add this code to the functions.php file of the active theme on your Dashboard site.
However, this filter might not be necessary. The date is now appended by default to the PDF filename.
And if you wish to customize the PDF filename in other ways, you can do that in the UI now:
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
WordPress® is a registered trademark of the WordPress Foundation, and WooCommerce® is a registered trademark of WooCommerce, Inc. MainWP is an independent product and is not affiliated, associated, or endorsed by the WordPress Foundation, WooCommerce, Inc., or Automattic Inc., except where noted under the Jetpack® API and Trademark License Agreement. All product names, logos, and brands are property of their respective owners and are used for identification purposes only.