Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories
Synchronize::start()
Starts the synchronization process.
Метод класса: Synchronize{}
Хуков нет.
Возвращает
true|false
.
Использование
$Synchronize = new Synchronize(); $Synchronize->start(): bool;
Код Synchronize::start() Synchronize::start WC 7.5.1
public function start(): bool { if ( null !== $this->queue->get_next( self::SYNC_TASK ) ) { wc_get_logger()->log( 'warning', __( 'Synchronization of approved product download directories is already in progress.', 'woocommerce' ) ); return false; } update_option( self::SYNC_TASK_PAGE, 1 ); $this->queue->schedule_single( time(), self::SYNC_TASK, array(), self::SYNC_TASK_GROUP ); wc_get_logger()->log( 'info', __( 'Approved Download Directories sync: new scan scheduled.', 'woocommerce' ) ); return true; }