Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Synchronize::stop()publicWC 1.0

Stops/cancels the current synchronization task.

Method of the class: Synchronize{}

No Hooks.

Return

null. Nothing (null).

Usage

$Synchronize = new Synchronize();
$Synchronize->stop();

Synchronize::stop() code WC 8.7.0

public function stop() {
	WC_Admin_Notices::add_notice( 'download_directories_sync_complete', true );
	delete_option( self::SYNC_TASK_PAGE );
	delete_option( self::SYNC_TASK_PROGRESS );
	$this->queue->cancel( self::SYNC_TASK );
}