Skip to content

Instantly share code, notes, and snippets.

@jessepearson
jessepearson / bookings_calendar_default_to_first_available.php
Last active October 31, 2023 12:56
By default the current month will be shown on the WooCommerce Bookings calendar for performance reasons. This will default it to the month with the first available block.
<?php // do not copy this line
/**
* Will make the Bookings calender default to the month with the first available booking.
*/
add_filter( 'wc_bookings_calendar_default_to_current_date', '__return_false' );
<?php
// put array in here
$array = array (
'key' => 'group_54624ad06f391',
'title' => 'Company List',
'fields' => array (
array (
'key' => 'field_54624aff43237',
'label' => 'Companies',