-
-
Save bentasm1/461999e0047567b132be to your computer and use it in GitHub Desktop.
Change the Pro Dashboard Date Range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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