Skip to content

Instantly share code, notes, and snippets.

@ihslimn
Created December 4, 2023 19:53
Show Gist options
  • Save ihslimn/31f63c890f5ced37b4aafa1c6fb0fb9b to your computer and use it in GitHub Desktop.
Save ihslimn/31f63c890f5ced37b4aafa1c6fb0fb9b to your computer and use it in GitHub Desktop.
JetBooking Restore booking product if it is not restoring automatically
<?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