Automattic\WooCommerce\Internal\DataStores\Orders
LegacyDataCleanup::can_run()
Determine whether the cleanup process can be initiated. Legacy data cleanup requires HPOS to be authoritative and compatibility mode to be disabled.
Method of the class: LegacyDataCleanup{}
No Hooks.
Return
true|false
. TRUE if the cleanup process can be enabled, FALSE otherwise.
Usage
$LegacyDataCleanup = new LegacyDataCleanup(); $LegacyDataCleanup->can_run();
LegacyDataCleanup::can_run() LegacyDataCleanup::can run code WC 9.3.3
public function can_run() { return $this->data_synchronizer->custom_orders_table_is_authoritative() && ! $this->data_synchronizer->data_sync_is_enabled() && ! $this->batch_processing->is_enqueued( get_class( $this->data_synchronizer ) ); }