Created
January 3, 2017 20:17
-
-
Save jessepearson/df5c3808f5880230af1888ce3c8eb990 to your computer and use it in GitHub Desktop.
Filter to tell Bookings to show the calendar month when the first block is available
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 // Do not copy this line unless needed | |
| /** | |
| * As of Bookings 1.9.13 the current date will be shown in the calendar for performance reasons. | |
| * To return to the previous functionality, a filter was put in place. The below function uses this | |
| * filter to tell Bookings to show the calendar month when the first block is available. | |
| * @param bool $move - This is here just to prevent errors | |
| * @return bool false for first block's month, true for current month | |
| */ | |
| function move_bookings_calendar_to_first_available_block( $move ) { | |
| return false; | |
| } | |
| add_filter( 'wc_bookings_calendar_default_to_current_date', 'move_bookings_calendar_to_first_available_block' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Should use following filter instead:
add_filter( 'wc_bookings_calendar_default_to_current_date', '__return_false' );