Skip to content

Instantly share code, notes, and snippets.

@bentasm1
Forked from digitalchild/functions.php
Created November 3, 2015 22:43
Show Gist options
  • Save bentasm1/461999e0047567b132be to your computer and use it in GitHub Desktop.
Save bentasm1/461999e0047567b132be to your computer and use it in GitHub Desktop.
Change the Pro Dashboard Date Range
<?php
// Change the start date
// from 1 year ago to 1 week ago
add_filter('wcv_dashboard_start_date', 'dashboard_start_date' );
function dashboard_start_date() {
return '-1 week';
}
// Change the end date
// from today to yesterday
add_filter('wcv_dashboard_end_date', 'dashboard_end_date' );
function dashboard_end_date() {
return 'now -1 day';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment