PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.3
11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 10.11.2 All 203 releases
← All changes | core/admin/wpbc-settings-functions.php +5 -2 11.211.8.3 View file →
@@ -1,4 +1,4 @@
1 1 <?php /**
2 2 * @version 1.0
3 3 * @package Booking Calendar
4 4 * @category Support functions for Settings page
@@ -81,10 +81,13 @@
81 81 if ( ( isset( $_GET['reset'] ) ) && ( 'custom_forms' == $_GET['reset'] ) ) { // FixIn: 8.1.3.21.
82 82
83 83 wpbc_open_meta_box_section( 'wpbc_general_settings_system_info', 'System Info' );
84 84
85 - // Reset Custom Booking Forms to NONE
86 - update_bk_option( 'booking_forms_extended', serialize( array() ) );
85 + global $wpdb;
86 + if ( function_exists( 'wpbc_is_table_exists' ) && wpbc_is_table_exists( 'booking_form_structures' ) ) {
87 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
88 + $wpdb->query( "DELETE FROM {$wpdb->prefix}booking_form_structures WHERE form_slug <> 'standard'" );
89 + }
87 90
88 91 wpbc_show_message_in_settings( '<strong>Custom forms</strong> has been reseted!', 'info' );
89 92
90 93 wpbc_close_meta_box_section();