Automattic\WooCommerce\Utilities

OrderUtil::custom_orders_table_data_sync_is_enabledpublic staticWC 11.0.0

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 (a cheap option read) and does not run a query to check whether the tables are currently fully synchronized. Use this when you only need to know if sync is turned on, not whether every order is currently in sync.

Method of the class: OrderUtil{}

No Hooks.

Returns

true|false. True if data sync is enabled, false otherwise.

Usage

$result = OrderUtil::custom_orders_table_data_sync_is_enabled(): bool;

Changelog

Since 11.0.0 Introduced.

OrderUtil::custom_orders_table_data_sync_is_enabled() code WC 11.0.1

public static function custom_orders_table_data_sync_is_enabled(): bool {
	return wc_get_container()->get( COTMigrationUtil::class )->custom_orders_table_data_sync_is_enabled();
}