Automattic\WooCommerce\Internal\PushNotifications
PushNotifications::on_init
Loads the push notifications class.
Method of the class: PushNotifications{}
No Hooks.
Returns
null. Nothing (null).
Usage
$PushNotifications = new PushNotifications(); $PushNotifications->on_init(): void;
Changelog
| Since 10.6.0 | Introduced. |
PushNotifications::on_init() PushNotifications::on init code WC 10.7.0
public function on_init(): void {
if ( ! $this->should_be_enabled() ) {
return;
}
$this->register_post_types();
wc_get_container()->get( PendingNotificationStore::class )->register();
( new PushTokenRestController() )->register();
( new NewOrderNotificationTrigger() )->register();
( new NewReviewNotificationTrigger() )->register();
}