=== Codestorm Technology Ticketing for WooCommerce ===
Contributors: codestormtechnology
Tags: tickets, woocommerce, qr-code, ticket-scanner, event-tickets
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.2
Requires Plugins: woocommerce
Stable tag: 1.0.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn WooCommerce products into simple tickets with visit dates, local QR/PDF generation and one-time check-in.

== Description ==

Codestorm Technology Ticketing for WooCommerce is a lightweight ticketing layer that works with WooCommerce. It keeps payments and product pricing in WooCommerce and adds the essentials needed to issue and validate tickets.

Version 1.0.8 includes:

* A simple Ticketing for WooCommerce dashboard.
* Ticket-enabled WooCommerce products.
* Global visit calendar with open weekdays and time slots.
* Visit date/time captured in the cart and order.
* One ticket per purchased unit after payment confirmation.
* Local QR Code generation. Ticket QR payloads are not sent to third-party QR services.
* Downloadable ticket PDFs generated locally by the plugin, with the QR drawn from the bundled QR matrix.
* Ticket links added to customer WooCommerce emails.
* Admin check-in with read-before-confirm flow.
* Atomic one-time consumption: a second entry is blocked.
* Optional camera scanning through the browser BarcodeDetector API, with manual/USB scanner fallback.
* Basic ticket list, settings and help screens.
* Ticket, calendar and protected operator check-in shortcodes.
* WordPress personal data exporter and eraser integration.
* RTL, keyboard-focus and reduced-motion friendly admin UI.

The plugin does not process payments itself. WooCommerce remains responsible for products, prices, checkout, payment gateways, taxes and refunds.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the `codestormtechnology-ticketing-woocommerce` folder to `/wp-content/plugins/` or install the ZIP through Plugins > Add New > Upload Plugin.
3. Activate Codestorm Technology Ticketing for WooCommerce.
4. Open Ticketing for WooCommerce > Calendar and configure available days and times.
5. Create or edit a WooCommerce product and enable the ticket option in Product data > General.
6. Complete a test purchase and use Ticketing for WooCommerce > Check-in to validate the generated ticket.

== Frequently Asked Questions ==

= Which shortcodes are available? =

`[codestorm_ticketing_tickets]` lists published WooCommerce products marked as tickets. Optional parameters: `limit` and `columns`.

`[codestorm_ticketing_calendar]` shows the next available dates and time slots from the global calendar. Optional parameters: `days` and `limit`.

`[codestorm_ticketing_checkin]` provides a protected front-end check-in for authenticated users who have ticket-validation permission. Reading a ticket does not consume it; confirmation is still required.

For backward compatibility, the legacy shortcode aliases `[ai_box_office_tickets]`, `[ai_box_office_calendar]` and `[ai_box_office_checkin]` are also accepted.

= Does the plugin handle payments? =

No. WooCommerce remains responsible for products, prices, checkout, payment gateways, taxes and refunds.

= Does reading a QR Code immediately use the ticket? =

No. Reading only inspects the ticket. The operator must press Confirm entry to consume it.

= Can the same ticket be used twice? =

No. The database update that consumes a ticket only succeeds while the ticket is still active. Later attempts are rejected.

= Is the QR Code sent to an external API? =

No. QR images are rendered locally using the bundled QR library.

= Where are ticket PDFs stored? =

They are generated on demand and streamed to the authorized requester. Version 1.0.9 does not store generated PDF files permanently.

= Does it support WooCommerce HPOS? =

The plugin uses WooCommerce order APIs and declares compatibility with High-Performance Order Storage.

= Can I use a USB QR scanner? =

Yes. Scanners that behave like a keyboard can fill the check-in field. Supported browsers can also use the camera through the BarcodeDetector API.

== Privacy ==

The plugin stores the minimum purchaser information needed to issue and validate tickets: order reference, ticket code, customer name/e-mail, visit date/time and usage state. Check-in audit records store hashed IP address and hashed user-agent values rather than their raw values.

The plugin registers with the WordPress personal data exporter and eraser tools. Erasure anonymizes customer name/e-mail and the WordPress user reference while retaining the order reference and operational ticket state for transaction integrity.

QR Codes and ticket PDFs are generated locally. Version 1.0.9 does not send ticket payloads to any Codestorm Technology service.

== External services ==

The plugin does not contact a Codestorm Technology API or cloud service. QR Codes and ticket PDFs are generated locally by the bundled PHP libraries.

WooCommerce itself, payment gateways, e-mail providers, hosting services, browser features and other extensions installed by the site owner may communicate with their own external services independently of this plugin.

The optional camera scanner uses the browser BarcodeDetector API when the visitor's browser supports it; the plugin does not upload camera images to Codestorm Technology.

== Third-party libraries ==

The production ZIP bundles only the following runtime libraries locally; no CDN is required. Their upstream license files remain included under `vendor/`.

* chillerlan/php-qrcode 6.0.1 — MIT and Apache-2.0
* chillerlan/php-settings-container 3.3.0 — MIT

Ticket PDFs are generated by the plugin itself with core PDF operators. QR graphics are drawn directly from the local QR matrix, so no HTML-to-PDF library, remote QR service or CDN is required.

The plugin folder and text domain are `codestormtechnology-ticketing-woocommerce`, matching the requested WordPress.org permalink. Existing database keys and `aibo_*` implementation prefixes are retained only for upgrade/data compatibility and are not the plugin display name or permalink.

== Screenshots ==

1. Ticketing for WooCommerce dashboard and ticket overview.
2. Ticket products displayed with the ticket-list shortcode.
3. Visit dates and available time slots with the calendar shortcode.
4. Protected ticket check-in with read-before-confirm workflow.
5. Basic Ticketing for WooCommerce settings.
6. Built-in help for tickets, calendar, check-in, shortcodes and privacy.

== Changelog ==

= 1.0.9 =
* Corrected URL output escaping in the plain-text WooCommerce ticket e-mail using `esc_url()`.
* Renamed the bundled Apache 2.0 license file to `LICENSE-ASL-2.0.txt` so the license remains distributed with an allowed text-file extension.
* No ticketing, QR, PDF, calendar or check-in behavior was otherwise changed.

= 1.0.8 =
* Changed the public plugin name to `Codestorm Technology Ticketing for WooCommerce` following WordPress.org review guidance.
* Changed the package folder and text domain to `codestormtechnology-ticketing-woocommerce` for the requested permalink.
* Removed `Tested up to` from the PHP plugin header; compatibility is declared only in `readme.txt`.
* Added new `codestorm_ticketing_*` shortcode names while retaining the previous shortcode aliases for compatibility.
* Kept the local QR/PDF implementation and the reduced third-party dependency set from 1.0.7.

= 1.0.7 =
* Clarified local QR/PDF generation and third-party dependency disclosures.
* Removed the HTML-to-PDF dependency tree and generate ticket PDFs locally with core PDF operators.
* Reduced bundled runtime libraries to the local QR generator and its settings container, with explicit license inventory.

= 1.0.6 =
* Improved frontend contrast for calendar, ticket cards and WooCommerce visit fields.
* Added theme-isolated page-title contrast for pages using the calendar shortcode.

= 1.0.5 =
* Added translator comments required by WordPress coding standards for placeholder-bearing translatable strings in Help and ticket shortcode output.

= 1.0.4 =
* Added ticket-list, calendar and protected check-in shortcodes.
* Added shortcode documentation and examples to the built-in Help screen.

= 1.0.3 =
* Added the official WordPress.org author profile link for Codestorm Technology.

= 1.0.2 =
* Plugin Check cleanup: moved uninstall logic into a prefixed function so temporary variables no longer pollute global scope.

= 1.0.1 =
* Plugin Check hardening: fixed prepared SQL construction, sanitized the WooCommerce order key and documented intentional custom-table database access.
* Prefixed uninstall-scope variables and documented intentional schema cleanup during uninstall.

= 1.0.0 =
* Initial free release.
* WooCommerce ticket products, calendar, QR/PDF ticket delivery and one-time check-in.
