Skip to content

Instantly share code, notes, and snippets.

@bizzthemes
Created April 28, 2016 07:56
Show Gist options
  • Save bizzthemes/ae210ce5cf8396f05dd4417d76a3c5ec to your computer and use it in GitHub Desktop.
Save bizzthemes/ae210ce5cf8396f05dd4417d76a3c5ec to your computer and use it in GitHub Desktop.
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment