Automattic\WooCommerce\Internal\PushNotifications\Controllers
PushTokenRestController::get_schema
Get the schema for the POST endpoint.
Method of the class: PushTokenRestController{}
No Hooks.
Returns
Array[].
Usage
$PushTokenRestController = new PushTokenRestController(); $PushTokenRestController->get_schema(): array;
Changelog
| Since 10.6.0 | Introduced. |
PushTokenRestController::get_schema() PushTokenRestController::get schema code WC 10.8.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()
),
)
);
}