# metasync/2.6.10/includes/class-metasync-deactivator.php

Search Atlas SEO – OTTO AI SEO Automation for WordPress, version 2.6.10. 53 lines.

- Page: https://pluginprobe.com/plugins/metasync/2.6.10/code/includes/class-metasync-deactivator.php
- Raw: https://pluginprobe.com/plugins/metasync/2.6.10/raw/includes/class-metasync-deactivator.php
- Modified: 2026-05-13T12:11:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metasync/2.6.10/code/includes/class-metasync-deactivator.php#L10-L20`.

```php
<?php

/**
 * Fired during plugin deactivation
 *
 * @link       https://searchatlas.com
 * @since      1.0.0
 *
 * @package    Metasync
 * @subpackage Metasync/includes
 */

/**
 * Fired during plugin deactivation.
 *
 * This class defines all code necessary to run during the plugin's deactivation.
 *
 * @since      1.0.0
 * @package    Metasync
 * @subpackage Metasync/includes
 * @author     Engineering Team <support@searchatlas.com>
 */
class Metasync_Deactivator
{

	/**
	 * Short Description. (use period)
	 *
	 * Long Description.
	 *
	 * @since    1.0.0
	 */
	public static function deactivate()
	{
		// add_filter('wp_sitemaps_enabled', '__return_true');
		//delete_option( "metasync_options" );
		//delete_option( "metasync_options_instant_indexing" );

		// Clean up announce ping counter
		delete_option('metasync_announce_attempt_count');

		// Unschedule every MetaSync cron hook so no orphaned events remain after deactivation
		foreach (Metasync_Activator::$cron_hooks as $hook) {
			wp_unschedule_hook($hook);
		}

		flush_rewrite_rules();

		// Reset WP-299 one-time cleanup flag so it re-runs on next activation/update
		delete_option('metasync_wp299_cron_cleanup_done');
	}
}

```
