Automattic\WooCommerce\Internal\PushNotifications\Notifications
Notification::get_safety_net_args
Canonical positional ActionScheduler arguments for the safety-net job.
Single source of truth shared by the scheduler (and its dedupe guard) and the cancel path so the serialized args always match. Action Scheduler matches the stored args by exact equality, so any divergence between the schedule-side and cancel-side shapes silently breaks cancellation.
The args are keyed on the notification's identity — the minimal data needed to uniquely identify and reconstruct the notification — mirroring {@see self::get_identifier()}. Volatile payload fields (e.g. a stock snapshot captured at trigger time) must not be included: they are not part of the identity and may differ between schedule and cancel.
Method of the class: Notification{}
No Hooks.
Returns
Array
Usage
$Notification = new Notification(); $Notification->get_safety_net_args(): array;
Changelog
| Since 10.9.0 | Introduced. |
Notification::get_safety_net_args() Notification::get safety net args code WC 10.9.4
public function get_safety_net_args(): array {
return array( $this->get_type(), $this->get_resource_id() );
}