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.
Метод класса: LegacyDataCleanup{}
Хуков нет.
Возвращает
true|false
. TRUE if the cleanup process can be enabled, FALSE otherwise.
Использование
$LegacyDataCleanup = new LegacyDataCleanup(); $LegacyDataCleanup->can_run();
Код LegacyDataCleanup::can_run() LegacyDataCleanup::can run WC 9.7.1
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 ) ); }