Tribe__Tickets__Attendee_Repository::__construct()
Tribe__Tickets__Attendee_Repository constructor.
Source
File: src/Tribe/Attendee_Repository.php
public function __construct() {
parent::__construct();
$this->create_args['post_type'] = current( $this->attendee_types() );
$this->default_args = array_merge( $this->default_args, [
'post_type' => $this->attendee_types(),
'orderby' => [ 'date', 'title', 'ID' ],
'post_status' => 'any',
] );
// Add initial simple schema.
$this->add_simple_meta_schema_entry( 'event', $this->attendee_to_event_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'event__not_in', $this->attendee_to_event_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'ticket', $this->attendee_to_ticket_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'ticket__not_in', $this->attendee_to_ticket_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'order', $this->attendee_to_order_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'order__not_in', $this->attendee_to_order_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'product_id', $this->attendee_to_ticket_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'product_id__not_in', $this->attendee_to_ticket_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'purchaser_name', $this->purchaser_name_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'purchaser_name__not_in', $this->purchaser_name_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'purchaser_name__like', $this->purchaser_name_keys(), 'meta_like' );
$this->add_simple_meta_schema_entry( 'purchaser_email', $this->purchaser_email_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'purchaser_email__not_in', $this->purchaser_email_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'purchaser_email__like', $this->purchaser_email_keys(), 'meta_like' );
$this->add_simple_meta_schema_entry( 'security_code', $this->security_code_keys(), 'meta_in' );
$this->add_simple_meta_schema_entry( 'security_code__not_in', $this->security_code_keys(), 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'user', '_tribe_tickets_attendee_user_id', 'meta_in' );
$this->add_simple_meta_schema_entry( 'user__not_in', '_tribe_tickets_attendee_user_id', 'meta_not_in' );
$this->add_simple_meta_schema_entry( 'price', '_paid_price' );
$this->schema = array_merge( $this->schema, [
'optout' => [ $this, 'filter_by_optout' ],
'rsvp_status' => [ $this, 'filter_by_rsvp_status' ],
'rsvp_status__or_none' => [ $this, 'filter_by_rsvp_status_or_none' ],
'provider' => [ $this, 'filter_by_provider' ],
'provider__not_in' => [ $this, 'filter_by_provider_not_in' ],
'event_status' => [ $this, 'filter_by_event_status' ],
'order_status' => [ $this, 'filter_by_order_status' ],
'order_status__not_in' => [ $this, 'filter_by_order_status_not_in' ],
'price_min' => [ $this, 'filter_by_price_min' ],
'price_max' => [ $this, 'filter_by_price_max' ],
'has_attendee_meta' => [ $this, 'filter_by_attendee_meta_existence' ],
'checkedin' => [ $this, 'filter_by_checkedin' ],
] );
$this->init_order_statuses();
}