miriam-m
4/28/2016 - 7:56 AM

Default calendar view set to current day

Default calendar view set to current day


<?php
//* Do NOT include the opening php tag, only copy the code below to functions.php file

if ( class_exists( 'WC_Appointments' ) ) {
    // Default Calendar view: 'day' or 'month'
    add_filter( 'woocommerce_appointments_calendar_view', 'appointments_default_view' );
    function appointments_default_view() {
        $default_view = 'day';
        return $default_view;
    }
}