Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories\Admin
SyncUI::cancel_sync
If a migration is in progress, this will attempt to cancel it.
Method of the class: SyncUI{}
No Hooks.
Returns
null. Nothing (null).
Usage
$SyncUI = new SyncUI(); $SyncUI->cancel_sync();
SyncUI::cancel_sync() SyncUI::cancel sync code WC 10.7.0
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();
}