prefix . "apt_appointments"; $DropAppointments = "DROP TABLE `$AppointmentsManagerTable`"; $wpdb->query($DropAppointments); //2. Delete apt_staff table $DropStaffManagerTableName = $wpdb->prefix . "apt_staff"; $DropStaff = "DROP TABLE `$DropStaffManagerTableName`"; $wpdb->query($DropStaff); //3. Delete apt_services table $DropServiceManagerTable = $wpdb->prefix . "apt_services"; $DropService = "DROP TABLE `$DropServiceManagerTable`"; $wpdb->query($DropService); //4. Delete apt_clients table $DropClientsManagerTable = $wpdb->prefix . "apt_clients"; $DropClients = "DROP TABLE `$DropClientsManagerTable`"; $wpdb->query($DropClients); //5. Delete apt_payment table $DropPaymentManagerTable = $wpdb->prefix . "apt_payment"; $DropPayment = "DROP TABLE `$DropPaymentManagerTable`"; $wpdb->query($DropPayment); //6. Delete apt_appearence table $DropAppearenceManagerTable = $wpdb->prefix . "apt_appearence"; $DropAppearence = "DROP TABLE `$DropAppearenceManagerTable`"; $wpdb->query($DropAppearence); //7. Delete apt_holidays table $DropHolidaysManagerTable = $wpdb->prefix . "apt_holidays"; $DropHolidays = "DROP TABLE `$DropHolidaysManagerTable`"; $wpdb->query($DropHolidays); //8. Delete apt_coupons table $DropCouponsManagerTable = $wpdb->prefix . "apt_coupons"; $DropCoupons = "DROP TABLE `$DropCouponsManagerTable`"; $wpdb->query($DropCoupons); //9. Delete apt_settings table $DropSettingManagerTable = $wpdb->prefix . "apt_settings"; $DropSetting = "DROP TABLE `$DropSettingManagerTable`"; $wpdb->query($DropSetting); //10. Delete Category table $DropCategoryManagerTable = $wpdb->prefix . "apt_category"; $DropCategory = "DROP TABLE `$DropCategoryManagerTable`"; $wpdb->query($DropCategory); //11. DELETE NOTIFICTION OPTION delete_option( 'Appoint_notification' ); delete_option( 'service_tips' ); delete_option( 'time_tips' ); delete_option( 'details_tips' ); delete_option( 'confirm_tips' ); delete_option( 'payment_tips' ); delete_option( 'done_tips' ); deactivate_plugins( 'appointment-scheduler-wpfrank/appointment-scheduler-wpfrank.php', true ); $url = admin_url( 'plugins.php?deactivate=true' ); header( "Location: $url" ); die(); } ?>