The following code is work around by using the filter in the code above and by returning an empty array. It is placed in functions.php of your theme.
It’s not a ‘work around’. That’s the correct way to do it. But there is a shorter way to do the same thing.
WordPress has a function called __return_empty_array()
that just returns array()
. So if you want to empty an array with a filter, you can just use that:
add_filter( 'woocommerce_bookings_emails_ics', '__return_empty_array' );