mgibbs189

{{gist file=”test.md” lang=”markdown”}}
Hello,

I’m the author of FacetWP (an advanced filtering plugin), and we have a Bookings add-on that lets users find available products between two dates.

I’m in the process of improving our add-on, and came across these 2 methods:

* get_blocks_in_range()
* get_available_blocks()

I was hoping to use `get_blocks_in_range()` to grab ALL blocks (even unavailable ones) between a start/end date. Unfortunately it’s not working that way. That method checks against availability rules, and excludes unavailable blocks.

Could you possibly add the following hook to allow us to bypass the availability check?:

includes/class-wc-product-booking-rule-manager.php:886

Before:

`return $bookable;`

After:

`return apply_filters( ‘woocommerce_bookings_is_date_bookable’, $bookable, $bookable_product, $resource_id, $check_date );`

Thanks!
{{/gist}}