Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin

SyncUI::cancel_sync()publicWC 1.0

If a migration is in progress, this will attempt to cancel it.

Method of the class: SyncUI{}

No Hooks.

Return

null. Nothing (null).

Usage

$SyncUI = new SyncUI();
$SyncUI->cancel_sync();

SyncUI::cancel_sync() code WC 8.6.1

public function cancel_sync() {
	$this->security_check();
	wc_get_logger()->log( 'info', __( 'Approved Download Directories sync: scan has been cancelled.', 'woocommerce' ) );
	wc_get_container()->get( Synchronize::class )->stop();
}