* @author HamidReza Gharahzadeh * @author Sepehr Najafi * @author Babak Alizadeh * @since 1.0.0 * * @package ssbhesabix */ // If uninstall not called from WordPress, then exit. if (!defined( 'WP_UNINSTALL_PLUGIN')) { exit; } include_once(plugin_dir_path(__DIR__) . 'admin/services/HesabixLogService.php'); require 'includes/class-ssbhesabix-api.php'; // delete tags in hesabix $hesabixApi = new Ssbhesabix_Api(); $result = $hesabixApi->fixClearTags(); if (!$result->Success) { HesabixLogService::log(array("ssbhesabix - Cannot clear tags. Error Message: " . (string)$result->ErrorMessage . ". Error Code: " . (string)$result->ErrorCode)); } global $wpdb; $options = $wpdb->get_results("SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '%ssbhesabix%'"); foreach ($options as $option) { delete_option($option->option_name); } $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ssbhesabix");