Automattic\WooCommerce\Internal\PushNotifications\Entities
PushToken::to_wpcom_format
Returns this token formatted for the WPCOM push notifications endpoint.
Метод класса: PushToken{}
Хуков нет.
Возвращает
array{user_id: int|null, token: string|null, origin: string|null, device_locale: string|null}.
Использование
$PushToken = new PushToken(); $PushToken->to_wpcom_format(): array;
Список изменений
| С версии 10.7.0 | Введена. |
Код PushToken::to_wpcom_format() PushToken::to wpcom format WC 11.3.0
public function to_wpcom_format(): array {
return array(
'user_id' => $this->user_id,
'token' => $this->token,
'origin' => $this->origin,
'device_locale' => $this->device_locale ?? self::DEFAULT_DEVICE_LOCALE,
);
}