Automattic\WooCommerce\Internal\Logging
OrderLogsDeletionProcessor::init
Initialize the instance. This is invoked by the dependency injection container.
Method of the class: OrderLogsDeletionProcessor{}
No Hooks.
Returns
null. Nothing (null).
Usage
$OrderLogsDeletionProcessor = new OrderLogsDeletionProcessor(); $OrderLogsDeletionProcessor->init( $hpos_controller, $legacy_proxy, $data_synchronizer );
- $hpos_controller(CustomOrdersTableController) (required)
- The instance of CustomOrdersTableController to use.
- $legacy_proxy(LegacyProxy) (required)
- The instance of LegacyProxy to use.
- $data_synchronizer(DataSynchronizer) (required)
- The instance of DataSynchronizer to use.
OrderLogsDeletionProcessor::init() OrderLogsDeletionProcessor::init code WC 10.4.3
final public function init( CustomOrdersTableController $hpos_controller, LegacyProxy $legacy_proxy, DataSynchronizer $data_synchronizer ) {
$this->hpos_in_use = $hpos_controller->custom_orders_table_usage_is_enabled();
if ( ! $this->hpos_in_use ) {
$this->cpt_in_use = \WC_Order_Data_Store_CPT::class === \WC_Data_Store::load( 'order' )->get_current_class_name();
}
$this->legacy_proxy = $legacy_proxy;
$this->data_synchronizer = $data_synchronizer;
}