=== Ticket Classes for Event Espresso ===
Contributors: mmulligan
Tags: event espresso, tickets, classes, questions, front of house
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 0.2.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Tag Event Espresso tickets with a "class" and drive question visibility, ticket scoping, and catalog grouping from it.

== Description ==

Ticket Classes adds a free-text **class** field to every Event Espresso ticket — one or more space-separated tokens such as `attendee`, `apparel`, or `apparel-crew` — and layers behavior on top of it so a single label can control how a ticket behaves across registration and point of sale.

**What it does with a ticket's class:**

* **Conditional registration questions.** A registration question whose admin label ends in `-cond` is shown only on tickets whose class includes the matching token (for example, an `apparel-cond` question appears only on `apparel` tickets). Non-conditional questions are unaffected. This applies both in standard Event Espresso checkout and, when present, at the point of sale.
* **Catalog grouping.** Tickets can be grouped into class-based categories so the selling catalog organizes itself by class, with sub-classes (`apparel-crew`) rolling up under their base class (`apparel`).
* **Class-based ticket scoping.** A selling profile can be limited to tickets whose class matches a configured filter, so a given station or context only offers the relevant tickets. Sub-classes match their base token, and tickets with no class are excluded from a filtered scope (fail-closed).

The class field itself is added to Event Espresso's ticket model and edited in the advanced ticket details, so it is available to your own templates and queries as well.

**Standalone, with an optional integration.** The ticket-class field and the conditional-question behavior work on a plain Event Espresso install. The catalog grouping, ticket scoping, and per-profile class filtering integrate with **Front of House for Event Espresso** through hooks that are inert when that app is not installed.

== Installation ==

1. Install and activate Event Espresso.
2. Upload this plugin to `wp-content/plugins/` and activate it. Activation adds the class column to the ticket table.
3. Edit a ticket and set its class token(s) in the advanced ticket details.
4. (Optional) Name conditional registration questions with a `-cond` suffix, and — if you use Front of House for Event Espresso — configure per-profile class filters on your selling profiles.

== Frequently Asked Questions ==

= How do I make a question conditional on a ticket class? =

Give the question an admin label ending in `-cond`, prefixed with the class token it belongs to (for example `apparel-cond`). It will then appear only on tickets whose class includes `apparel`.

= Can a ticket have more than one class? =

Yes. The class field is space-separated, so a ticket can carry several tokens (for example `attendee apparel`). Sub-classes use a hyphen, like `apparel-crew`, and match their base token for filtering and grouping.

= Does this require Front of House for Event Espresso? =

No. The class field and conditional registration questions work on plain Event Espresso. Catalog grouping, ticket scoping, and per-profile class filters activate only when Front of House is present.

== Changelog ==

= 0.2.2 =
* Update channel + repository URLs moved to the ee-extensions org. No functional change.

= 0.2.1 =
* Ticket class field on the Event Espresso ticket model, edited in advanced ticket details.
* Class-conditional registration question visibility in standard checkout and at the point of sale.
* Class-based catalog grouping with sub-class roll-up.
* Per-selling-profile class filters and class-based ticket scoping for Front of House for Event Espresso.
