<?php

/**
 * Fired when the plugin is uninstalled.
 *
 *
 *
 * @link       The Creative Next
 * @since      1.0.0
 *
 * @package    Bookingor
 */

// If uninstall not called from WordPress, then exit.
if (! defined('WP_UNINSTALL_PLUGIN')) {
	exit;
}


global $wpdb;
$bookingorDb = $wpdb;



$delete_notifications = $wpdb->prefix . "bookingor_notifications";
$delete_booked_appointment = $wpdb->prefix . "bookingor_booked_appointment";
$delete_categories = $wpdb->prefix . "bookingor_categories";
$delete_customer_add = $wpdb->prefix . "bookingor_customer_add";
$delete_notification_log = $wpdb->prefix . "bookingor_notification_log";
$delete_location_assign_staff = $wpdb->prefix . "bookingor_location_assign_staff";
$delete_location_assign_service = $wpdb->prefix . "bookingor_location_assign_service";
$delete_location = $wpdb->prefix . "bookingor_location";
$delete_customers_payment = $wpdb->prefix . "bookingor_customers_payment";
$delete_services = $wpdb->prefix . "bookingor_services";
$delete_staff_add = $wpdb->prefix . "bookingor_staff_add";
$delete_staff_assign_service = $wpdb->prefix . "bookingor_staff_assign_service";
$delete_timesheet = $wpdb->prefix . "bookingor_timesheet";


$bookingorDb->query("SET FOREIGN_KEY_CHECKS = 0");

$bookingorDb->query("DROP TABLE IF EXISTS $delete_notifications");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_booked_appointment");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_categories");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_customer_add");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_notification_log");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_location_assign_staff");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_location_assign_service");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_location");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_customers_payment");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_services");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_staff_add");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_staff_assign_service");
$bookingorDb->query("DROP TABLE IF EXISTS $delete_timesheet");

$bookingorDb->query("SET FOREIGN_KEY_CHECKS = 1");
