Automattic\WooCommerce\Internal\PushNotifications\Services
PendingNotificationStore::dispatch_all
Dispatches all pending notifications via InternalNotificationDispatcher.
Called on shutdown. Sends all pending notifications through the InternalNotificationDispatcher, then clears the store.
Method of the class: PendingNotificationStore{}
No Hooks.
Returns
null. Nothing (null).
Usage
$PendingNotificationStore = new PendingNotificationStore(); $PendingNotificationStore->dispatch_all(): void;
Changelog
| Since 10.7.0 | Introduced. |
PendingNotificationStore::dispatch_all() PendingNotificationStore::dispatch all code WC 11.0.1
public function dispatch_all(): void {
if ( empty( $this->pending ) ) {
return;
}
$this->dispatcher->dispatch( array_values( $this->pending ) );
$this->enabled = false;
$this->pending = array();
}