Automattic\WooCommerce\Internal\PushNotifications\Notifications
Notification::reset_processing_meta
Clears the in-progress delivery state from this notification's resource.
Call this on every terminal path (success, no recipients, and each of the retry handler's give-up branches) so a notification that has finished leaves nothing behind. The sent marker is deliberately not cleared: it is the idempotency guard that stops NotificationProcessor::process() sending the same notification twice, and only StockNotificationRecoveryHandler{} clears it, to re-arm a stock notification after a restock.
Leaving the claimed marker behind is not only a storage cost. A stock notification that exhausted its retries would keep it forever, and NotificationProcessor::process() returns early when it is present, so that product could never send that notification again.
Method of the class: Notification{}
No Hooks.
Returns
void. Nothing (null).
Usage
$Notification = new Notification(); $Notification->reset_processing_meta(): void;
Changelog
| Since 11.2.0 | Introduced. |
Notification::reset_processing_meta() Notification::reset processing meta code WC 11.3.0
public function reset_processing_meta(): void {
$this->delete_meta( NotificationProcessor::CLAIMED_META_KEY );
$this->delete_meta( NotificationProcessor::TRIGGERED_META_KEY );
}