HEX
Server: Apache
System: Linux webd001.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: mciraet (192513)
PHP: 8.2.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/mciraet/www/wp-content/plugins/polylang-wc/uninstall.php
<?php
/**
 * @package Polylang-WC
 */

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

/**
 * Manages Polylang for WooCommerce uninstallation.
 *
 * @since 0.4
 */
class PLLWC_Uninstall {

	/**
	 * Constructor: manages uninstall for multisite.
	 *
	 * @since 0.4
	 */
	public function __construct() {
		global $wpdb;

		// Check if it is a multisite uninstall - if so, run the uninstall function for each blog id.
		if ( is_multisite() ) {
			foreach ( $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" ) as $blog_id ) {
				switch_to_blog( $blog_id );
				$this->uninstall();
			}
			restore_current_blog();
		} else {
			$this->uninstall();
		}
	}

	/**
	 * Removes ALL plugin data.
	 *
	 * @since 0.4
	 */
	public function uninstall() {
		// Delete options.
		delete_option( 'polylang-wc' );

		// Deletes Updater's cache options on uninstallation.
		require __DIR__ . '/dependencies/wpsyntex/updater/uninstall.php';
	}
}

new PLLWC_Uninstall();