Created
December 11, 2017 16:01
-
-
Save LiamBailey/a49c5287d43657603a629fee9b48beb2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_bookings_in_date_range_query', 'wswp_filter_check_in_cart', 100, 1); | |
function wswp_filter_check_in_cart( $booking_ids ) { | |
foreach( $booking_ids as $key => $booking_id ) { | |
$booking = get_wc_booking( $booking_id ); | |
if ( $booking->has_status( 'in-cart' ) ) { | |
unset( $booking_ids[$key] ); | |
} | |
} | |
return $booking_ids; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment