Automattic\WooCommerce\Internal\Utilities

COTMigrationUtil::is_custom_order_tables_in_sync()publicWC 1.0

Checks if posts and order custom table sync is enabled and there are no pending orders.

Method of the class: COTMigrationUtil{}

No Hooks.

Return

true|false.

Usage

$COTMigrationUtil = new COTMigrationUtil();
$COTMigrationUtil->is_custom_order_tables_in_sync() : bool;

COTMigrationUtil::is_custom_order_tables_in_sync() code WC 8.9.0

public function is_custom_order_tables_in_sync() : bool {
	if ( ! $this->data_synchronizer->data_sync_is_enabled() ) {
		return false;
	}

	$sync_status = $this->data_synchronizer->get_sync_status();
	return 0 === $sync_status['current_pending_count'];
}