Tribe__Tickets__REST__V1__Endpoints__QR::CHECK_IN_args()
Returns the content of the args array that should be used to register the endpoint with the register_rest_route function.
Return
(array)
Source
File: src/Tribe/REST/V1/Endpoints/QR.php
public function CHECK_IN_args() {
$ticket_label_singular_lower = esc_html( tribe_get_ticket_label_singular_lowercase( 'rest_qr' ) );
return [
// QR fields.
'api_key' => [
'required' => true,
'validate_callback' => [ $this->validator, 'is_string' ],
'type' => 'string',
'description' => __( 'The API key to authorize check in.', 'event-tickets' ),
],
'ticket_id' => [
'required' => true,
'validate_callback' => [ $this->validator, 'is_numeric' ],
'type' => 'string',
'description' => esc_html(
sprintf(
// Translators: %s is the 'ticket' label (singular, lowercase).
__( 'The ID of the %s to check in.', 'event-tickets' ),
$ticket_label_singular_lower
)
),
],
'security_code' => [
'required' => true,
'validate_callback' => [ $this->validator, 'is_string' ],
'type' => 'string',
'description' => esc_html(
sprintf(
// Translators: %s is the 'ticket' label (singular, lowercase).
__( 'The security code of the %s to verify for check in.', 'event-tickets' ),
$ticket_label_singular_lower
)
),
],
];
}
Changelog
| Version | Description |
|---|---|
| 5.7.0 | Introduced. |