Ticket::register_post_type()
Register this Class post type into WP.
Source
File: src/Tickets/Commerce/Ticket.php
public function register_post_type() {
$post_type_args = [
'label' => __( 'Tickets', 'event-tickets' ),
'labels' => [
'name' => __( 'Tickets Commerce Tickets', 'event-tickets' ),
'singular_name' => __( 'Tickets Commerce Ticket', 'event-tickets' ),
],
'public' => false,
'show_ui' => false,
'show_in_menu' => false,
'query_var' => false,
'rewrite' => false,
'capability_type' => 'post',
'has_archive' => false,
'hierarchical' => false,
];
/**
* Filter the arguments that craft the ticket post type.
*
* @see register_post_type
*
* @since 5.1.9
*
* @param array $post_type_args Post type arguments, passed to register_post_type()
*/
$post_type_args = apply_filters( 'tec_tickets_commerce_ticket_post_type_args', $post_type_args );
register_post_type( static::POSTTYPE, $post_type_args );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |