Automattic\WooCommerce\Internal\PushNotifications\Notifications

Notification::to_arraypublicWC 10.7.0

Returns the notification data as an array.

Method of the class: Notification{}

No Hooks.

Returns

Array{type:. string, resource_id: int}

Usage

$Notification = new Notification();
$Notification->to_array(): array;

Changelog

Since 10.7.0 Introduced.

Notification::to_array() code WC 10.7.0

public function to_array(): array {
	return array(
		'type'        => $this->type,
		'resource_id' => $this->resource_id,
	);
}