=== CatCode QR Event Tickets ===
Contributors: catcodestudio
Tags: event tickets, qr code, ticket scanner, event registration, pdf ticket
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Event tickets on any WordPress site: a PDF ticket with a QR code in the e-mail and a phone scanner at the door. No WooCommerce needed.

== Description ==

Add an event, set the ticket types, and the event page starts taking orders. The visitor gets a PDF ticket with a QR code by e-mail. At the entrance, any phone opens the scanner in the browser: no app to install, no WooCommerce, no outside service.

**For the visitor**

* A ticket form that works in any theme: on the event page, on any page with the "Event tickets" block, or with the `[catcode_tickets event="123"]` shortcode.
* A PDF with one QR code per ticket, attached to the letter, plus a calendar file for the phone.
* A page with the tickets, which opens from the letter even if the letter went to spam: the QR codes are right there on the screen.

**For the organiser**

* Ticket types with a price or free, seats per type and seats for the whole event, sale dates, a limit of tickets per order. Two buyers of the last seat cannot both get it.
* Free tickets, pay at the door, or bank transfer with your own details: the tickets go out when you mark the order as paid.
* Orders and visitors in the admin area, a CSV export, adding orders by hand for guests and the box office, sending a letter again, cancelling an order so the seats go back on sale.
* If the site cannot send mail, the order says so instead of hiding it.
* Letters in the language the order was placed in, on sites with several languages.
* A list of upcoming events with the `[catcode_events]` shortcode. Event pages carry schema.org data for search engines.
* Export and erasure through the WordPress personal data tools.

**At the door**

* The scanner runs in the phone browser over https. On iPhone and Android it reads the code with the camera; a USB scanner or typing the code works too.
* One code, one entry: when two scanners read the same ticket at the same moment, exactly one says "Welcome". A repeated ticket shows when and where it was used.
* Clear answers: ticket of another event, cancelled, not paid, to pay at the door with the sum. An entry made by mistake can be cancelled.
* Staff use accounts with the "Ticket scanner" role: they can scan and see nothing else.

// @pro-start
**Pro**

* Online payments on the page of the service: Stripe, PayPal, LiqPay, WayForPay, monobank, Tpay. The tickets go out by themselves, also when the buyer never comes back to the site. Refunds from the order screen.
* Promo codes: percent or fixed, for one event or all, with a limit of uses and an end date.
* A name on every ticket and your own questions for each visitor.
* Scanner links for door staff without an account, for one event until a date you set, and a scanner that keeps working offline when the venue loses the network. While offline, each phone checks against the list it has: a ticket shown at two offline phones goes through both, and the conflict appears after they reconnect.
* Your logo, colour and text on the PDF ticket.
* Reminder letters before the event.

The 7-day trial is free. A licence is for 1 to 5 years: after it ends the features keep working, only updates and support stop.
// @pro-end

**Good to know**

* PDF tickets use Liberation Sans: Latin, Cyrillic and Greek. Names in other alphabets, such as Arabic or Chinese, need your own font through the `catcode_tickets_pdf_font` filter.
* Browsers open the camera only on an https address.
* Letters go through the mail function of your site. If it is unreliable, use an SMTP plugin.

== Installation ==

1. Install and activate the plugin.
2. Open Event tickets, Add event. Set the date, the place and at least one ticket type, then publish.
3. For paid tickets, turn on a way to pay in Event tickets, Settings, Payments.
4. On the day, open Event tickets, Scanner and point a phone at the code on that screen.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. The plugin keeps its own orders and needs no other plugin.

= Does the scanner need an app? =

No, it is a page in the phone browser. It needs an https site and permission to use the camera.

= What if the page with the ticket form is cached? =

Seats are read from the server when the page opens and checked again when the order is placed, so a cached page does not sell seats that are gone.

= Can a ticket be copied? =

A copy of a QR code works until one of the copies is scanned. After that every other copy shows "Already used" with the time.

= What happens to the data when the plugin is deleted? =

It stays, unless you turn on the deletion in Settings, General. Then events, orders and tickets are deleted with the plugin.

== Third-party libraries ==

* jsQR 1.4.0, Apache-2.0, reads QR codes in browsers without a built-in reader: https://github.com/cozmo/jsQR (assets/vendor/jsqr, not minified).
* Liberation Sans fonts, SIL Open Font License 1.1 (assets/fonts).

== Changelog ==

= 1.0.0 =
* First release.
