Automattic\WooCommerce\Internal\Utilities
COTMigrationUtil::custom_orders_table_data_sync_is_enabled
Checks whether the real-time data sync between the posts and orders tables is enabled.
Unlike is_custom_order_tables_in_sync(), this only reflects whether the sync setting is enabled and does not run a query to determine whether the tables are currently fully synchronized, so it is much cheaper to call. Use this when you only need to know if sync is turned on, not whether every order is in sync.
Method of the class: COTMigrationUtil{}
No Hooks.
Returns
bool. True if data sync is enabled, false otherwise.
Usage
$COTMigrationUtil = new COTMigrationUtil(); $COTMigrationUtil->custom_orders_table_data_sync_is_enabled(): bool;
Changelog
| Since 11.0.0 | Introduced. |
COTMigrationUtil::custom_orders_table_data_sync_is_enabled() COTMigrationUtil::custom orders table data sync is enabled code WC 11.0.1
public function custom_orders_table_data_sync_is_enabled(): bool {
return $this->data_synchronizer->data_sync_is_enabled();
}