<?php

/**
 * Fired when the plugin is uninstalled.
 *
 *
 * @link       https://www.eurostocks.com
 * @since      1.0.0
 *
 * @package    Eurostocks
 */

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

global $wpdb;

$table_name_eurostocks_ip = $wpdb->prefix . 'eurostocks_ip';
$wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i;', $table_name_eurostocks_ip ) );

$table_name_analytics = $wpdb->prefix . 'eurostocks_requests';
$wpdb->query( $wpdb->prepare( 'DROP TABLE IF EXISTS %i;', $table_name_analytics ) );

delete_option( 'eurostocks_db_version' );
