Automattic\WooCommerce\Internal\PushNotifications\Services
NotificationProcessor::init
Initialize dependencies.
Method of the class: NotificationProcessor{}
No Hooks.
Returns
null. Nothing (null).
Usage
$NotificationProcessor = new NotificationProcessor(); $NotificationProcessor->init( $dispatcher, $data_store, $preferences_service, $retry_handler, $step_logger ): void;
- $dispatcher(WpcomNotificationDispatcher) (required)
- The WPCOM dispatcher.
- $data_store(PushTokensDataStore) (required)
- The push tokens data store.
- $preferences_service(NotificationPreferencesService) (required)
- The notification preferences service.
- $retry_handler(NotificationRetryHandler) (required)
- The retry handler.
- $step_logger(NotificationStepLogger) (required)
- The step logger.
Changelog
| Since 10.7.0 | Introduced. |
NotificationProcessor::init() NotificationProcessor::init code WC 11.3.0
final public function init(
WpcomNotificationDispatcher $dispatcher,
PushTokensDataStore $data_store,
NotificationPreferencesService $preferences_service,
NotificationRetryHandler $retry_handler,
NotificationStepLogger $step_logger
): void {
$this->dispatcher = $dispatcher;
$this->data_store = $data_store;
$this->preferences_service = $preferences_service;
$this->retry_handler = $retry_handler;
$this->step_logger = $step_logger;
}