Automattic\WooCommerce\Internal\Logging

OrderLogsDeletionProcessor::initpublicWC 1.0

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, $order_logs_cleanup_helper );
$hpos_controller(CustomOrdersTableController) (required)
The instance of CustomOrdersTableController to use.
$legacy_proxy(LegacyProxy) (required)
The instance of LegacyProxy to use.
$order_logs_cleanup_helper(OrderLogsCleanupHelper) (required)
The instance of OrderLogsCleanupHelper to use.

OrderLogsDeletionProcessor::init() code WC 10.8.1

final public function init( CustomOrdersTableController $hpos_controller, LegacyProxy $legacy_proxy, OrderLogsCleanupHelper $order_logs_cleanup_helper ) {
	$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->order_logs_cleanup_helper = $order_logs_cleanup_helper;
}