Automattic\WooCommerce\Internal\StockNotifications\Emails
EmailActionController::get_notification_to_be_processed
Retrieves the notification to be processed based on the provided notification ID and action key.
Method of the class: EmailActionController{}
No Hooks.
Returns
Notification|false. The notification object if found and has an action key, 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() EmailActionController::get notification to be processed code WC 10.3.6
private function get_notification_to_be_processed( int $notification_id ): ?Notification {
$notification = Factory::get_notification( (int) $notification_id );
if ( ! $notification ) {
return false;
}
if ( empty( $notification->get_meta( 'email_link_action_key' ) ) ) {
return false;
}
return $notification;
}