=== SazTicket – Event Ticket Check-in & Scanner for WooCommerce ===
Contributors: alexsazonov
Tags: ticket scanner, qr scanner, event tickets, check in, woocommerce tickets
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Mobile QR code ticket generator, browser camera check-in scanner, and instant Telegram alerts for WooCommerce events.

== Description ==

**SazTicket** is a high-performance **QR code ticket scanner** and **event check-in system** for WooCommerce. Turn any smartphone (iPhone, Android) into a laser-fast door access control scanner without installing heavy mobile apps.

Designed specifically for concerts, conferences, sports events, festivals, theaters, and seminars.

### Features

* **Browser-Based QR Camera Scanner:** Event staff simply open a secure web link (`?sazticket_scanner=1`) on their mobile device and scan attendee QR codes directly with the camera. Zero app downloads needed.
* **Instant Telegram Push Alerts:** Automated notifications sent to your private Telegram bot whenever tickets are issued, guests check in at the door, or duplicate passes are detected.
* **Atomic Anti-Fraud Duplicate Prevention:** Database-level atomic state transitions prevent duplicate check-ins. If an attendee forwards a ticket or takes a screenshot, the second scan immediately triggers a red security alert with the exact previous admission timestamp.
* **Audio & Haptic Feedback:** Clear chime and vibration for valid tickets; loud security siren buzzer for invalid or reused passes.
* **Automatic WooCommerce Order Delivery:** Automatically generates electronic entry tickets with scannable QR codes for completed orders and attaches them to customer emails.
* **WooCommerce HPOS Compatible:** Built and officially declared for High-Performance Order Storage (HPOS).
* **Lightweight & Self-Hosted:** No external third-party subscriptions or tracking. Minimal overhead on your WordPress site.

== External services ==

This plugin integrates with two external services to deliver its core functionality:

1. **QRServer API (api.qrserver.com)**
   * **Purpose:** Renders QR code images displayed on customer ticket notifications and the admin pass view.
   * **Data Transmitted:** Only the unique ticket verification code string is passed via HTTPS GET (no customer personal details, names, or payment information are transmitted).
   * **Terms of Service:** https://goqr.me/legal/tos-api.html
   * **Privacy Policy:** https://goqr.me/privacy-safety-security/

2. **Telegram Bot API (api.telegram.org)**
   * **Purpose:** Delivers instant administrative alerts for ticket check-ins, duplicate entry attempts, and completed WooCommerce ticket orders.
   * **Data Transmitted:** Order ID, ticket code, attendee name, and event name sent exclusively to the store administrator's private configured Telegram Bot and Chat ID.
   * **Terms of Service:** https://telegram.org/tos
   * **Privacy Policy:** https://telegram.org/privacy

== Installation ==

1. Upload the `sazticket-event-ticket-scanner` folder to `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Navigate to **QR Tickets** in your admin menu to manage tickets or view admissions.
4. (Optional) Enter your Telegram Bot Token & Chat ID in the Telegram tab to receive real-time notifications.
5. Open the Live Scanner URL (`yoursite.com/?sazticket_scanner=1`) on your mobile phone to begin scanning.

== Frequently Asked Questions ==

= Do staff members need to download a native mobile app? =
No. The scanner works in any modern mobile browser (Safari, Chrome, Firefox) on devices with camera access.

= Does this plugin slow down WooCommerce checkout? =
No. Camera and scanner scripts load strictly on the dedicated scanner screen. Notifications run asynchronously via WooCommerce Action Scheduler when available.

= Is this plugin compatible with WooCommerce HPOS? =
Yes. SazTicket officially declares native compatibility with High-Performance Order Storage (HPOS).

= How does duplicate prevention work? =
When a ticket is verified, its database status switches to 'used' with an atomic timestamp. Subsequent scans of the same ticket trigger an alert indicating previous admission.

= How do I ensure customer ticket emails do not land in spam? =
For guaranteed 100% inbox delivery, we recommend pairing SazTicket with a reliable SMTP plugin (such as FluentSMTP or WP Mail SMTP) configured with SPF, DKIM, and DMARC records on your domain.

== Screenshots ==

1. Live camera mobile HUD scanner verifying guest tickets in browser.
2. Anti-fraud duplicate alert with exact prior admission timestamp.
3. WooCommerce & Admin tickets manager with real-time status ledger.
4. Instant Telegram dispatcher for order alerts, door check-ins, and security sirens.

== Changelog ==

= 2.1.1 =
* Updated QRServer external service documentation URLs in readme.txt to active endpoints.
* Fixed syntax issue in ticket email notification template.

= 2.1.0 =
* Renamed and rebranded to SazTicket to prevent trademark conflicts.
* Enqueued all scripts and styles using WordPress wp_enqueue_script and wp_enqueue_style.
* Hardened REST API permission checks with scanner token authentication.
* Removed unneeded bundled translation files in compliance with translate.wordpress.org standards.
* Added explicit documentation for external API services (QRServer and Telegram).
* Added uninstall.php cleanup script.
* Updated Author URI to WordPress.org verified profile.

= 2.0.0 =
* Initial release with Action Scheduler dispatcher, HPOS compatibility, and camera scanner HUD.
