<?php
if (!defined("WP_UNINSTALL_PLUGIN")) exit;

global $wpdb;

// Table names
$invoice_table   = $wpdb->prefix . "simpinby_invoices";
$items_table     = $wpdb->prefix . "simpinby_invoice_items";
$customers_table = $wpdb->prefix . "simpinby_customers";
$products_table  = $wpdb->prefix . "simpinby_products";

// Delete tables
$wpdb->query("DROP TABLE IF EXISTS {$items_table}");
$wpdb->query("DROP TABLE IF EXISTS {$invoice_table}");
$wpdb->query("DROP TABLE IF EXISTS {$customers_table}");
$wpdb->query("DROP TABLE IF EXISTS {$products_table}");

// Delete options
delete_option("simpinby_invoice_number_settings");
delete_option("simpinby_tax_settings");
delete_option("simpinby_pdf_settings");
delete_option("simpinby_mail_settings");
