- changed status to resolved
Make day-view/ month-view standard (settings)
Issue #15
resolved
Can you add an option to the settings page where one can set a default view for the calendar?
In "class-wc-appointments-admin-calendar.php" line 19:
if($calendar_default = 'day'){
$view = isset( $_REQUEST['view'] ) && $_REQUEST['view'] == 'month' ? 'month' : 'day';
}else {
$view = isset( $_REQUEST['view'] ) && $_REQUEST['view'] == 'day' ? 'day' : 'month';
}
Thanks a lot!
Comments (3)
-
-
reporter Could you add the following code to the Documentation (e.g. something like "Hooks")
in functions.php if ( class_exists( 'WC_Appointments' ) ) { // Default Calendar view: 'day' or 'month' function appointments_default_view() { $default_view = 'day'; return $default_view; } add_filter( 'woocommerce_appointments_calendar_view', 'appointments_default_view' ); }
-
Added: https://bizzthemes.com/help/setup/wc-appointments/tutorials/admin-calendar-view-day-month/.
Thanks for the effort.
- Log in to comment
Implemented with 1.8.2