HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/cwd/wp-content/woocommerce-perfect-seo-url/uninstall.php
<?php
/**
 * PSU Uninstall
 *
 * @author      Perfect SEO url
 * @category    Core
 * @version     2.2
 */

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    exit; // Exit if accessed directly
}

global $wpdb;

$api_email = get_option( 'psu_email' );
$api_key = get_option( 'psu_key' );

// Deactivate license
if ( get_option( 'psu_activated' ) === 'Activated' && $api_key !== '' && $api_email !== '' ) {
    $args = array(
        'email' => $api_email,
        'licence_key' => $api_key,
    ); 

    require_once 'perfect-seo-url.php';
    PSU()->key()->deactivate( $args );
}

// Delete options
$wpdb->query( "DELETE FROM " . $wpdb->options . " WHERE option_name LIKE 'psu_%';" );

// Remove tables
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "psu_redirects" );
$wpdb->query( "DROP TABLE IF EXISTS " . $wpdb->prefix . "psu_terms" );

// Flush rewrite rules
flush_rewrite_rules();