| @@ -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(); |
| @@ -99,8 +102,10 @@ | ||
| 99 | 102 | * // Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) .' &pot=1#wpbc_general_settings_system_info_metabox |
| 100 | 103 | * |
| 101 | 104 | */ |
| 102 | 105 | function wpbc_settings__system_info__generate_php_from_pot() { |
| 106 | + | |
| 107 | + return; | |
| 103 | 108 | |
| 104 | 109 | if ( ! current_user_can( 'activate_plugins' ) ) { |
| 105 | 110 | return; |
| 106 | 111 | } |