Automattic\WooCommerce\Internal\DataStores\Orders
DataSynchronizer::init
Class initialization, invoked by the DI container.
Method of the class: DataSynchronizer{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DataSynchronizer = new DataSynchronizer(); $DataSynchronizer->init( $data_store, $database_util, $posts_to_cot_migrator, $legacy_proxy, $order_cache_controller, $batch_processing_controller );
- $data_store(OrdersTableDataStore) (required)
- The data store to use.
- $database_util(DatabaseUtil) (required)
- The database util class to use.
- $posts_to_cot_migrator(PostsToOrdersMigrationController) (required)
- The posts to COT migration class to use.
- $legacy_proxy(LegacyProxy) (required)
- The legacy proxy instance to use.
- $order_cache_controller(OrderCacheController) (required)
- The order cache controller instance to use.
- $batch_processing_controller(BatchProcessingController) (required)
- The batch processing controller to use.
DataSynchronizer::init() DataSynchronizer::init code WC 10.3.6
final public function init(
OrdersTableDataStore $data_store,
DatabaseUtil $database_util,
PostsToOrdersMigrationController $posts_to_cot_migrator,
LegacyProxy $legacy_proxy,
OrderCacheController $order_cache_controller,
BatchProcessingController $batch_processing_controller
) {
$this->data_store = $data_store;
$this->database_util = $database_util;
$this->posts_to_cot_migrator = $posts_to_cot_migrator;
$this->legacy_proxy = $legacy_proxy;
$this->error_logger = $legacy_proxy->call_function( 'wc_get_logger' );
$this->order_cache_controller = $order_cache_controller;
$this->batch_processing_controller = $batch_processing_controller;
}