Developer: need a filter for a Bookable Product’s min_date and max_date
First: It’s great that there are lots of filter hooks throughout this extension (way more than are listed in the documentation). We’re able to use them to tweak functionality in ways that are really specific to our use case.
One great one is the ‘woocommerce_booking_get_availability_rules’, which lets us programatically change a product’s availability on its booking form page based on certain criteria. But we can’t change the earliest and latest available times, which are stored in separate variables (min_date and max_date) from the availability rules array.
I get why this happens: these are calculated on the fly every time a product is viewed, whereas the “rules” only need to be recalculated when the product or resource is changed in the back end.
But conceptually, the min and max start dates are part of the availability rules, and it doesn’t really make sense to be able to filter all the rules except these. Please add a filter for each/both of these! If anyone at Woo wants more details about how I’m trying to use this, feel free to email me.
I asked for this via a support ticket and it got added! Thanks!