-
-
Save vishalbasnet23/f1fc33651c0b5a5cbd644b493375faf3 to your computer and use it in GitHub Desktop.
This file contains 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