Automattic\WooCommerce\Internal\PushNotifications\Controllers

PushTokenRestController::get_schema │ public │ WC 10.6.0

Get the schema for the POST endpoint.

Метод класса: PushTokenRestController{}

Хуков нет.

Возвращает

array[].

Использование

$PushTokenRestController = new PushTokenRestController();
$PushTokenRestController->get_schema(): array;

Список изменений

С версии 10.6.0 Введена.

Код PushTokenRestController::get_schema() WC 11.2.1

public function get_schema(): array {
	return array_merge(
		$this->get_base_schema(),
		array(
			'title'      => PushToken::POST_TYPE,
			'properties' => array_map(
				fn ( $item ) => array_intersect_key(
					$item,
					array(
						'description' => null,
						'type'        => null,
						'enum'        => null,
						'minimum'     => null,
						'default'     => null,
						'required'    => null,
					)
				),
				$this->get_args()
			),
		)
	);
}