<?php
if(!defined('WP_UNINSTALL_PLUGIN')){
    exit();
}
class NBInvoiceUninstall{
    static function init(){
        delete_option('nb_invoice_config');
        global $wpdb;
        $table_name = $wpdb->prefix . 'netbase_invoice_templates';
        $_sql = 'DROP TABLE IF EXISTS ' . $table_name;
        $wpdb->query($_sql);
        // 
        $table_order = $wpdb->prefix . 'netbase_invoice_order';
        $_sql_drop_order = 'DROP TABLE IF EXISTS ' . $table_order;
        $wpdb->query($_sql_drop_order);
    }
}
NBInvoiceUninstall::init();