Created
December 4, 2023 19:53
-
-
Save ihslimn/31f63c890f5ced37b4aafa1c6fb0fb9b to your computer and use it in GitHub Desktop.
JetBooking Restore booking product if it is not restoring automatically
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( 'init', function() { | |
if ( ! function_exists( 'jet_abaf' ) || jet_abaf()->settings->get( 'booking_mode' ) !== 'plain' ) { | |
return; | |
} | |
$settings = jet_abaf()->settings; | |
$settings->update( 'wc_product_id', PHP_INT_MAX, false ); | |
jet_abaf()->wc->mode->maybe_set_required_mode_settings( $settings ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment