public function render_guests_page() { if (!class_exists('HFIS_Guests_Module')) { require_once HFIS_PLUGIN_DIR . 'modules/guests/class-guests.php'; } $guests = new HFIS_Guests_Module(); $guests->render_page(); }// Guests table $table_name = $wpdb->prefix . HFIS_TABLE_GUESTS; $sql = "CREATE TABLE IF NOT EXISTS $table_name ( id int(11) NOT NULL AUTO_INCREMENT, guest_name varchar(255) NOT NULL, company_name varchar(255), gst_number varchar(50), mobile_number varchar(20) NOT NULL, email varchar(100), address text, check_in_date datetime NOT NULL, check_out_date datetime NOT NULL, number_of_nights int(11) NOT NULL, number_of_guests int(11) NOT NULL, room_id int(11), status varchar(20) DEFAULT 'active', check_out_notes text, created_at datetime DEFAULT CURRENT_TIMESTAMP, updated_at datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY room_id (room_id) ) $charset_collate;"; dbDelta($sql);