Use day, not time, in status widget for caching

This commit is contained in:
Mike Jolley 2019-03-06 17:25:35 +00:00
parent 6f983fb4eb
commit 7aa82a1829
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ if ( ! class_exists( 'WC_Admin_Dashboard', false ) ) :
$sales_by_date = new WC_Report_Sales_By_Date(); $sales_by_date = new WC_Report_Sales_By_Date();
$sales_by_date->start_date = strtotime( date( 'Y-m-01', current_time( 'timestamp' ) ) ); $sales_by_date->start_date = strtotime( date( 'Y-m-01', current_time( 'timestamp' ) ) );
$sales_by_date->end_date = current_time( 'timestamp' ); $sales_by_date->end_date = strtotime( date( 'Y-m-d', current_time( 'timestamp' ) ) );
$sales_by_date->chart_groupby = 'day'; $sales_by_date->chart_groupby = 'day';
$sales_by_date->group_by_query = 'YEAR(posts.post_date), MONTH(posts.post_date), DAY(posts.post_date)'; $sales_by_date->group_by_query = 'YEAR(posts.post_date), MONTH(posts.post_date), DAY(posts.post_date)';