diff --git a/adminpages/reports/sales.php b/adminpages/reports/sales.php index c9688fd01..95494fb60 100644 --- a/adminpages/reports/sales.php +++ b/adminpages/reports/sales.php @@ -278,6 +278,14 @@ function pmpro_report_sales_page() $startdate = date( 'Y-m-01', strtotime( current_time( 'mysql' ) . ' -12 month' ) ); // Set the end date to the last day of the previous month. $enddate = date('Y-m-t', strtotime( current_time( 'mysql' ) . ' -1 month' ) ); + } else if ( $period === 'custom' ) { + // Set up the report unit to use. + $report_unit = 'DAY'; + $axis_date_format = 'd'; + $tooltip_date_format = get_option( 'date_format' ); + // Set up the start and end dates. + $startdate = sanitize_text_field( $_REQUEST['custom_start_date'] ); + $enddate = sanitize_text_field( $_REQUEST['custom_end_date'] ); } else { // Set up the report unit to use. $report_unit = 'YEAR'; @@ -607,6 +615,7 @@ function pmpro_report_sales_page() + + + + + + +