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
| function get_product_availability() { | |
| global $product, $post; | |
| // Get dates from custom field | |
| $start_date = get_field('start_date'); | |
| $end_date = get_field('end_date'); | |
| // Get into class | |
| $WC_Product_Booking = new WC_Product_Booking($product); |
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
| var $product = $('#product'); | |
| var $bookingForm = $product.find('.cart'); | |
| var $picker = $bookingForm.find('.picker'); | |
| var $resources = $('#resources'); | |
| function checkAvailability( el ) { | |
| var fully_booked_ids = []; | |
| var jsonArray = el.data( 'fully-booked-days' ); | |
| var booking_date_year = $bookingForm.find('#booking_date_year').val(); |