Automattic\WooCommerce\Internal\PushNotifications\Notifications

Notification::reset_processing_meta │ public │ WC 11.2.0

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.

Метод класса: Notification{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$Notification = new Notification();
$Notification->reset_processing_meta(): void;

Список изменений

С версии 11.2.0 Введена.

Код Notification::reset_processing_meta() WC 11.3.0

public function reset_processing_meta(): void {
	$this->delete_meta( NotificationProcessor::CLAIMED_META_KEY );
	$this->delete_meta( NotificationProcessor::TRIGGERED_META_KEY );
}