Automattic\WooCommerce\Internal\PushNotifications\Dispatchers

WpcomNotificationDispatcher::failure │ private static │ WC 1.0

Builds the return value for a send that failed before or during the request.

Method of the class: WpcomNotificationDispatcher{}

No Hooks.

Returns

array{success: bool, retry_after: int|null, outcome: string, invalid_tokens: string[]}.

Usage

$result = WpcomNotificationDispatcher::failure( $outcome ): array;
$outcome(string) (required)
One of the SendOutcome constants.

WpcomNotificationDispatcher::failure() code WC 11.3.0

private static function failure( string $outcome ): array {
	return array(
		'success'        => false,
		'retry_after'    => null,
		'outcome'        => $outcome,
		'invalid_tokens' => array(),
	);
}