Automattic\WooCommerce\Internal\DataStores\Orders
CustomOrdersTableController::process_options_updated()
Handler for the all settings updated hook.
Метод класса: CustomOrdersTableController{}
Хуков нет.
Возвращает
null
. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->process_options_updated();
Код CustomOrdersTableController::process_options_updated() CustomOrdersTableController::process options updated WC 7.3.0
private function process_options_updated() { $data_sync_is_enabled = $this->data_synchronizer->data_sync_is_enabled(); // Disabling the sync implies disabling the automatic authoritative table switch too. if ( ! $data_sync_is_enabled && $this->auto_flip_authoritative_table_enabled() ) { update_option( self::AUTO_FLIP_AUTHORITATIVE_TABLE_ROLES_OPTION, 'no' ); } // Enabling/disabling the sync implies starting/stopping it too, if needed. // We do this check here, and not in process_pre_update_option, so that if for some reason // the setting is enabled but no sync is in process, sync will start by just saving the // settings even without modifying them (and the opposite: sync will be stopped if for // some reason it was ongoing while it was disabled). if ( $data_sync_is_enabled ) { $this->batch_processing_controller->enqueue_processor( DataSynchronizer::class ); } else { $this->batch_processing_controller->remove_processor( DataSynchronizer::class ); } }