Tribe__Tickets__REST__V1__Endpoints__Single_Attendee::CREATE_args()

Returns the content of the args array that should be used to register the endpoint with the register_rest_route function.


Return

(array) Array of supported arguments for the create endpoint.


Top ↑

Source

File: src/Tribe/REST/V1/Endpoints/Single_Attendee.php

	public function CREATE_args() {
		$args = [
			'ticket_id'             => [
				'required'          => true,
				'validate_callback' => 'tribe_events_product_is_ticket',
				'type'              => 'integer',
				'description'       => __( 'The Ticket ID, where the attendee is registered.', 'event-tickets' ),
			],
			'full_name'             => [
				'required'          => true,
				'type'              => 'string',
				'description'       => __( 'Full name of the attendee.', 'event-tickets' ),
			],
			'email'                 => [
				'required'          => true,
				'validate_callback' => 'is_email',
				'type'              => 'email',
				'description'       => __( 'Email of the attendeee.', 'event-tickets' ),
			],
			'attendee_status'       => [
				'required'          => false,
				'type'              => 'string',
				'description'       => __( 'Order Status for the attendee.', 'event-tickets' ),
			],

		];

		/**
		 * Filters the supported args for the create endpoint.
		 *
		 * @since 5.3.2
		 *
		 * @param array $args Supported list of arguments.
		 */
		return apply_filters( 'tribe_ticket_rest_api_post_attendee_args', $args );
	}

Top ↑

Changelog

Changelog
Version Description
5.3.2 Introduced.