Hi I would like to return the array that this filter provides:
add_filter( 'woocommerce_booking_get_availability_rules' , 'get_data' )
In the docs its says this about the filter;
I have made a custom endpoint and it returns this function:
function get_data($dates) {
return $dates;
}
However when I call my custom endpoint in postman the result of the above function is just an empty object.
Is there anything that I'm missing? Does the class this code sit in have to be an extension of a woocommerce class for it to return the data? Why don't I see an array returned?