Created
November 15, 2023 14:22
-
-
Save LaxusCroco/04201ab03f7649acc98992b7d7a4b135 to your computer and use it in GitHub Desktop.
Set the last available date in the JetBooking calendar. Change the '2023-12-31' to the needed date
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_action( 'wp_head', function () { ?> | |
<script> | |
jQuery( document ).on( 'jet-booking/init', () => { | |
window.jetBookingState.filters.add( "jet-booking/input/config", modifyBookingConfig ); | |
window.jetBookingState.filters.add( "jet-booking/calendar/config", modifyBookingConfig ); | |
function modifyBookingConfig( config ) { | |
config.endDate = '2023-12-31'; | |
return config; | |
} | |
} ); | |
</script> | |
<?php } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment