Automattic\WooCommerce\Internal\StockNotifications\Emails

EmailActionController::get_notification_to_be_processedprivateWC 1.0

Retrieves the notification to be processed based on the provided notification ID.

Method of the class: EmailActionController{}

No Hooks.

Returns

Notification|null. The notification object if found, null otherwise.

Usage

// private - for code of main (parent) class only
$result = $this->get_notification_to_be_processed( $notification_id ): ?Notification;
$notification_id(int) (required)
The ID of the notification to process.

EmailActionController::get_notification_to_be_processed() code WC 11.0.1

private function get_notification_to_be_processed( int $notification_id ): ?Notification {
	$notification = Factory::get_notification( (int) $notification_id );

	return $notification instanceof Notification ? $notification : null;
}