=== Dbook Event Management ===
Contributors: dbook
Donate link: https://dbook.in
Tags: events, ticketing, woocommerce, whatsapp, qr-code
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell event tickets on your WordPress site with 0% commissions. Automated WhatsApp & Email dynamic QR ticket delivery powered by Dbook Cloud.

== Description ==

**Dbook Event Management** connects your WordPress website directly with **Dbook Cloud** (https://dbook.in) developed by **DigitalBook Solutions PVT LTD, India**.

Sell event tickets directly on your own WordPress & WooCommerce website. Keep 100% of your ticket revenue with **0% third-party ticketing commissions**. Ticket sales are paid directly into your own merchant account (Stripe, PayPal, Razorpay, Cashfree, Square, Cards, or UPI) through your existing WooCommerce checkout.

Upon order completion, Dbook Cloud automatically generates tamper-proof dynamic QR event passes and dispatches them straight to attendees via verified **WhatsApp** message and **Email** within seconds.

At the gate, verify attendees in under 0.2 seconds using the free Dbook Mobile App (Android & iOS) with offline camera scanning, real-time fraud prevention, and instant attendance sync.

=== Key Features ===

* **0% Platform Ticketing Commission**: Sell tickets on your own domain with direct payouts into your payment gateway. No middlemen, no per-ticket percentage cuts.
* **Instant WhatsApp Pass Delivery**: Meta Cloud API-powered verified WhatsApp delivery with 1-click mobile pass link and attendee name.
* **Reliable Email Pass Delivery**: High-deliverability transactional emails with full event details and printable QR pass.
* **Delivery Channel Control**: Choose whether to send tickets via Email & WhatsApp (4 credits/pass), Email Only (2 credits/pass - ideal for international guests without WhatsApp), or WhatsApp Only (2 credits/pass).
* **Meta WhatsApp Message Templates**: Choose between lightweight Instant Text Pass (Meta Template ID: 1241936354750306) or Full Ticket Pro with Artwork Poster Header (Meta Template ID: 1771158393521702).
* **7 Visual Ticket Layout Designs**: Select from 7 designer pass layouts crafted in Dbook Ticket Design Studio:
    1. *Standard Pass* (Balanced card with poster, details, and centered QR)
    2. *Multi-Panel Pass* (Dual-section stub with full-width artwork header)
    3. *Concert / Festival Pass* (Full-bleed artwork background with vertical tear stub)
    4. *Simple Perforated Pass* (Clean compact pass with perforated ticket edge)
    5. *Only QR Pass* (Minimalist ultra-fast gate entry scanner layout)
    6. *Executive Horizontal Pass* (Sleek conference badge layout with square artwork)
    7. *Cinema / Boarding Stub* (Classic ticket stub pass with perforated barcode edge)
* **1-Click WooCommerce Sync**: Synchronizes event pricing tiers into WooCommerce virtual/downloadable products with automatic stock and cart quantity protection.
* **Live Attendance & Ticket Status Portal**: Monitor live checked-in attendees vs confirmed orders, inspect sequential pass serial numbers, view attendee contacts, and trigger 1-click ticket resends right inside WordPress admin.
* **Superfast Gate Check-In**: Scan dynamic QR passes at the entrance in under 0.2 seconds using the Dbook Event Management mobile app with offline verification.
* **Multi-Currency Support**: Supports USD ($), EUR (€), GBP (£), INR (₹), CAD, AUD, and all global WooCommerce currencies.
* **Credit-Protected Safety**: Built-in balance safeguard requiring at least 5 prepaid credits on Dbook.in to guarantee pass generation and WhatsApp delivery.
* **Shortcodes & Custom Builders**: Embed ticket selectors anywhere using `[dbook_ticket_selector id="EVENT_ID"]` or full responsive landing pages with `[dbook_event id="EVENT_ID"]`. Compatible with Elementor, Beaver Builder, Divi, Gutenberg, and classic themes.

== Third-Party / External Service Disclosure ==

This plugin relies on a 3rd-party cloud service: **Dbook Cloud API** (https://api.dbook.in) developed, operated, and maintained by **DigitalBook Solutions PVT LTD, India** (https://dbook.in).

**What the service provides**:
* Cryptographic signing and generation of dynamic, tamper-proof QR code event passes.
* Automated WhatsApp pass delivery via official Meta Cloud WhatsApp Business API.
* Transactional email delivery with embedded ticket QR passes.
* Real-time gate scanner verification, pass validation, and synchronized attendance statistics via the Dbook Mobile Scanner App.

**What data is transmitted to Dbook Cloud**:
* **Event Metadata**: Event title, starting/ending date & time, venue address, city, state, Google Maps URL, terms & conditions, refund policy, and ticket tier names, quantities, and pricing.
* **Attendee Checkout Data**: Upon completed WooCommerce order, the attendee's name, billing email, phone number (used exclusively for WhatsApp ticket delivery), order ID, and ticket tier purchased are securely transmitted over HTTPS to Dbook Cloud (`https://api.dbook.in/wp-plugin/v1/issue-tickets`) to issue dynamic QR passes.
* **No Financial Information**: Payment credentials, credit card details, and banking information are processed strictly by your WordPress WooCommerce payment gateways and are NEVER sent to or stored by Dbook Cloud.

**Terms of Service & Privacy Policy**:
* Terms of Service: https://dbook.in/terms-conditions
* Privacy Policy: https://dbook.in/privacy-policy
* Service Provider: DigitalBook Solutions PVT LTD, India
* Contact Email: admin@dbook.co.in

== Installation ==

1. Upload the plugin folder `dbook-event-management` to your WordPress `/wp-content/plugins/` directory, or upload `dbook-event-management.zip` via **WordPress Admin > Plugins > Add New > Upload Plugin**.
2. Click **Activate Plugin**.
3. Create your free organizer account at [https://dbook.in](https://dbook.in) if you do not already have one.
4. Navigate to [https://dbook.in/dashboard/integration](https://dbook.in/dashboard/integration) and copy your **Dbook API Key** (`dbk_live_...`). Ensure you have at least 5 available credits.
5. In your WordPress admin, go to **Dbook Events > Settings & API**, paste your API Key, and click **Test Connection & Save**.
6. Navigate to **Dbook Events > Add New Event** to create your first event, configure ticket pricing tiers, pick your ticket pass layout, and publish!

== Frequently Asked Questions ==

= Do I need WooCommerce installed to sell tickets? =
Yes, WooCommerce is used to process payments through your own merchant payment gateway (Stripe, PayPal, Razorpay, etc.) with 0% platform commission. If WooCommerce is active, ticket tiers automatically sync as hidden virtual products and checkout seamlessly. For free RSVP events, Dbook can also issue passes directly.

= How do prepaid credits work? =
Dbook uses a simple pay-per-ticket credit system for pass generation and cloud delivery:
* **Email Only**: 2 credits per ticket pass issued.
* **WhatsApp Only**: 2 credits per ticket pass issued.
* **Email & WhatsApp Both**: 4 credits per ticket pass issued.
A minimum balance of 5 credits on dbook.in is required to maintain active registration. You can recharge credits anytime at https://dbook.in/pricing (1 Credit = ₹1).

= How do attendees receive their tickets? =
Within seconds of completing checkout, attendees receive their digital QR pass with an individual pass link, sequential ticket serial, and event details sent directly to their WhatsApp chat and billing email address.

= How do we scan and verify tickets at the venue gate? =
Event organizers and gate staff can download the free **Dbook Event Management** mobile app from Google Play Store or Apple App Store. Log in with your organizer account, select the event, and scan attendee QR codes. Scans take under 0.2 seconds and work reliably even with spotty venue internet.

= Can I use Elementor, Beaver Builder, or custom page builders? =
Yes! You can design custom event pages using your favorite page builder and simply embed the ticket selector widget using the shortcode `[dbook_ticket_selector id="YOUR_EVENT_ID"]`.

= How do I resend a ticket if an attendee lost it? =
Go to **Dbook Events > Ticket Status** in your WordPress admin, locate the attendee by name, order number, or phone number, and click the **Resend Pass** button to instantly re-dispatch their pass.

== Screenshots ==

1. **Settings & API Connection**: Configure your live Dbook API key with 1-click connection test and credit balance badge.
2. **Event Editor**: Intuitive form to set event schedule, venue address, Google Maps link, and multi-currency pricing tiers.
3. **Attendee Pass Layout Design Studio**: Choose from 7 visual pass layouts including Standard, Multi-Panel, Concert, Perforated, QR Only, Executive, and Boarding Stub.
4. **Ticket Delivery Channels & WhatsApp Templates**: Configure Email & WhatsApp delivery and select Meta message templates with poster preview.
5. **Frontend Ticket Selector**: Modern responsive ticket selection block with instant quantity controls and 1-click WooCommerce checkout.
6. **WooCommerce Seamless Checkout**: Tickets appear in the WooCommerce cart with automatic cart protection to prevent duplicate accumulation.
7. **Ticket Status & Attendance Dashboard**: Live check-in stats, serial numbers, attendee contacts, and 1-click resend actions in WordPress admin.

== Changelog ==

= 1.0.8 =
* Full WordPress.org plugin directory guideline compliance.
* Added explicit Third-Party Cloud Service disclosure for Dbook Cloud API (`api.dbook.in`).
* Added 7 visual ticket pass layouts from Dbook Ticket Studio.
* Added configurable ticket delivery channels: Email & WhatsApp (4 credits), Email Only (2 credits), and WhatsApp Only (2 credits).
* Added Meta WhatsApp notification template selector (Simple Ticket vs Full Ticket Pro).
* Added terms & conditions and refund policy fields synced to Dbook Cloud.
* Enhanced WooCommerce cart empty handling to prevent quantity accumulation.
* Added sequential ticket serial tracking on the Ticket Status page.
* Normalized all admin classes and secured all output escaping.

= 1.0.0 =
* Initial public release.
* Cloud API integration with O(1) key verification.
* Full WooCommerce checkout integration.
* Automated WhatsApp & Email QR pass issuance.
* Real-time gate scanner sync.

== Upgrade Notice ==

= 1.0.8 =
Recommended update featuring 7 visual pass layouts, delivery channel selection, and enhanced WooCommerce synchronization.
